1
0
Fork 0
spacetac/src/core/TestTools.spec.ts

21 lines
852 B
TypeScript
Raw Normal View History

2017-09-24 22:23:22 +00:00
module TK.SpaceTac.Specs {
2017-10-26 21:47:13 +00:00
testing("TestTools", test => {
test.case("set ship health and power", check => {
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);
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);
TestTools.setShipModel(ship, 100, 200, 12);
2017-10-26 21:47:13 +00:00
check.equals(ship.getAttribute("hull_capacity"), 100);
check.equals(ship.getAttribute("shield_capacity"), 200);
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);
});
});
}