コード例 #1
0
 @Test
 public void testSetGetCost() {
   assertEquals(equipment.getCost(), COST, 0.0);
   Double newCost = 1900.0;
   equipment.setCost(newCost);
   assertEquals(equipment.getCost(), newCost, 80000.0);
 }
コード例 #2
0
 @Before
 public void setUp() throws Exception {
   equipment = new Equipment();
   equipment.setCost(COST);
   equipment.setSize(SIZE);
   inverter = new Inverter();
   equipment.setInverter(inverter);
   panels = new ArrayList<Panel>();
   equipment.setPanels(panels);
   battery = new Battery();
   equipment.setBattery(battery);
   inverters = new ArrayList<Inverter>();
 }
コード例 #3
0
 @Test
 public void testCostOf0() {
   Double newCost = 0.0;
   equipment.setCost(newCost);
   assertEquals(equipment.getCost(), newCost, 80000.0);
 }
コード例 #4
0
 @Test
 public void testHighCost() {
   Double newCost = 9999.9999;
   equipment.setCost(newCost);
   assertEquals(equipment.getCost(), newCost, 80000.0);
 }