1
0
Fork 0
spacetac/src/ui/BaseView.spec.ts

20 lines
634 B
TypeScript
Raw Permalink Normal View History

2017-02-10 00:08:28 +00:00
/// <reference path="TestGame.ts" />
2017-09-24 22:23:22 +00:00
module TK.SpaceTac.UI.Specs {
2017-10-26 21:47:13 +00:00
testing("BaseView", test => {
2017-10-29 21:08:55 +00:00
let testgame = setupEmptyView(test);
2017-02-21 22:38:31 +00:00
2017-10-26 21:47:13 +00:00
test.case("initializes variables", check => {
2017-02-21 22:38:31 +00:00
let view = <BaseView>testgame.ui.state.getCurrentState();
2017-02-10 00:08:28 +00:00
2017-10-26 21:47:13 +00:00
check.equals(view.messages instanceof Messages, true);
check.equals(view.inputs instanceof InputManager, true);
2017-02-10 00:08:28 +00:00
2017-10-26 21:47:13 +00:00
check.equals(view.getWidth(), 1920);
check.equals(view.getHeight(), 1080);
check.equals(view.getMidWidth(), 960);
check.equals(view.getMidHeight(), 540);
2017-02-10 00:08:28 +00:00
});
});
}