|
@@ -52,7 +52,27 @@ public class praktikumHolonsTestObjectController {
|
|
controller.addNewElementIntoCategoryObject("Building", "House", "A", 1, -10);
|
|
controller.addNewElementIntoCategoryObject("Building", "House", "A", 1, -10);
|
|
for (int i = 2; i < 27; i++) {
|
|
for (int i = 2; i < 27; i++) {
|
|
controller.addNewElementIntoCategoryObject("Building", "House", adapter.generate(i), i, -10);
|
|
controller.addNewElementIntoCategoryObject("Building", "House", adapter.generate(i), i, -10);
|
|
|
|
+ assertTrue("Total Energy does not match",((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House")).getCurrentEnergy() == -1800 + ((i* (i+1)) / 2) * -10);
|
|
assertTrue("Number of Elements does not Match", ((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House")).getElements().size() == 6+i);
|
|
assertTrue("Number of Elements does not Match", ((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House")).getElements().size() == 6+i);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "B");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "D");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "F");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "G");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "H");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "I");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "Z");
|
|
|
|
+ controller.deleteElementInCategory("Building", "House", "TV");
|
|
|
|
+ assertTrue("Element:B was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "B") == null);
|
|
|
|
+ assertTrue("Element:D was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "D") == null);
|
|
|
|
+ assertTrue("Element:F was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "F") == null);
|
|
|
|
+ assertTrue("Element:G was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "G") == null);
|
|
|
|
+ assertTrue("Element:H was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "H") == null);
|
|
|
|
+ assertTrue("Element:I was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "I") == null);
|
|
|
|
+ assertTrue("Element:Z was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "Z") == null);
|
|
|
|
+ assertTrue("Element:TV was not Found", mp.searchEle((HolonObject)mp.searchCatObj(mp.searchCat("Building"), "House"), "TV") == null);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|