|
|
@ -28,12 +28,12 @@ void main() {
|
|
|
|
final flameTester = FlameTester(() => TestGame(assets));
|
|
|
|
final flameTester = FlameTester(() => TestGame(assets));
|
|
|
|
|
|
|
|
|
|
|
|
group(
|
|
|
|
group(
|
|
|
|
'RampShotBehavior',
|
|
|
|
'RampContactBehavior',
|
|
|
|
() {
|
|
|
|
() {
|
|
|
|
test('can be instantiated', () {
|
|
|
|
test('can be instantiated', () {
|
|
|
|
expect(
|
|
|
|
expect(
|
|
|
|
RampShotBehavior(),
|
|
|
|
RampContactBehavior(),
|
|
|
|
isA<RampShotBehavior>(),
|
|
|
|
isA<RampContactBehavior>(),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ void main() {
|
|
|
|
"beginContact with door sensor calls bloc 'onDoor'",
|
|
|
|
"beginContact with door sensor calls bloc 'onDoor'",
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
final ball = Ball(baseColor: Colors.red);
|
|
|
|
final ball = Ball(baseColor: Colors.red);
|
|
|
|
final behavior = RampShotBehavior();
|
|
|
|
final behavior = RampContactBehavior();
|
|
|
|
final bloc = MockRampSensorCubit();
|
|
|
|
final bloc = MockRampSensorCubit();
|
|
|
|
whenListen(
|
|
|
|
whenListen(
|
|
|
|
bloc,
|
|
|
|
bloc,
|
|
|
@ -72,7 +72,7 @@ void main() {
|
|
|
|
"beginContact with inside sensor calls bloc 'onInside'",
|
|
|
|
"beginContact with inside sensor calls bloc 'onInside'",
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
final ball = Ball(baseColor: Colors.red);
|
|
|
|
final ball = Ball(baseColor: Colors.red);
|
|
|
|
final behavior = RampShotBehavior();
|
|
|
|
final behavior = RampContactBehavior();
|
|
|
|
final bloc = MockRampSensorCubit();
|
|
|
|
final bloc = MockRampSensorCubit();
|
|
|
|
whenListen(
|
|
|
|
whenListen(
|
|
|
|
bloc,
|
|
|
|
bloc,
|