Пример #1
0
 @Before
 public void setUp() throws Exception {
   user = new PlanUser();
   plan = new DataPlan(1000, 30);
   plan.setMode(DataPlan.TWOMONTH);
   user.setPlan(plan);
 }
Пример #2
0
  @Test
  public void testMeter2calcFlow() {
    user.setFlow(2015, 10, 900);
    user.setFlow(2015, 11, 700);
    user.setFlow(2015, 12, 500);
    user.setFlow(2016, 1, realFlow);
    assertEquals(feeFlow, user.calculateBillingFlow(2016, 1));

    user.setFlow(2015, 10, 1900);
    user.setFlow(2015, 11, 1200);
    user.setFlow(2015, 12, 1500);
    user.setFlow(2016, 1, realFlow);
    assertEquals(feeFlow2, user.calculateBillingFlow(2016, 1));
  }