|
|
@ -31,6 +31,7 @@ void main() {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
flameTester.test(
|
|
|
|
flameTester.test(
|
|
|
|
'throws AssertionError when not attached to controlled component',
|
|
|
|
'throws AssertionError when not attached to controlled component',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
@ -44,6 +45,20 @@ void main() {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flameTester.test(
|
|
|
|
|
|
|
|
'throws Exception when adding other component',
|
|
|
|
|
|
|
|
(game) async {
|
|
|
|
|
|
|
|
final component = ControlledComponent();
|
|
|
|
|
|
|
|
final controller = TestComponentController(component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final anotherComponet = Component();
|
|
|
|
|
|
|
|
await expectLater(
|
|
|
|
|
|
|
|
() async => controller.add(anotherComponet),
|
|
|
|
|
|
|
|
throwsException,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
group('Controls', () {
|
|
|
|
group('Controls', () {
|
|
|
|