2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac.Specs {
|
2017-10-26 21:47:13 +00:00
|
|
|
testing("TestTools", test => {
|
2018-02-08 15:16:03 +00:00
|
|
|
test.case("set ship health and power", check => {
|
2017-04-18 19:51:23 +00:00
|
|
|
let ship = new Ship();
|
|
|
|
|
2017-10-26 21:47:13 +00:00
|
|
|
check.equals(ship.getAttribute("hull_capacity"), 0);
|
|
|
|
check.equals(ship.getAttribute("shield_capacity"), 0);
|
2018-02-08 15:16:03 +00:00
|
|
|
check.equals(ship.getAttribute("power_capacity"), 0);
|
2017-10-26 21:47:13 +00:00
|
|
|
check.equals(ship.getValue("hull"), 0);
|
|
|
|
check.equals(ship.getValue("shield"), 0);
|
2017-04-18 19:51:23 +00:00
|
|
|
|
2018-02-08 15:16:03 +00:00
|
|
|
TestTools.setShipModel(ship, 100, 200, 12);
|
2017-04-18 19:51:23 +00:00
|
|
|
|
2017-10-26 21:47:13 +00:00
|
|
|
check.equals(ship.getAttribute("hull_capacity"), 100);
|
|
|
|
check.equals(ship.getAttribute("shield_capacity"), 200);
|
2018-02-08 15:16:03 +00:00
|
|
|
check.equals(ship.getAttribute("power_capacity"), 12);
|
2017-10-26 21:47:13 +00:00
|
|
|
check.equals(ship.getValue("hull"), 100);
|
|
|
|
check.equals(ship.getValue("shield"), 200);
|
2017-04-18 19:51:23 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|