|
|
|
@ -129,12 +129,10 @@ void main() {
|
|
|
|
|
final callback = TestRampOpeningBallContactCallback();
|
|
|
|
|
|
|
|
|
|
when(() => ball.body).thenReturn(body);
|
|
|
|
|
when(() => ball.priority).thenReturn(1);
|
|
|
|
|
when(() => body.position).thenReturn(Vector2.zero());
|
|
|
|
|
when(() => ball.layer).thenReturn(Layer.board);
|
|
|
|
|
|
|
|
|
|
await game.ready();
|
|
|
|
|
await game.ensureAdd(area);
|
|
|
|
|
|
|
|
|
|
callback.begin(ball, area, MockContact());
|
|
|
|
|
verify(() => ball.layer = area.pathwayLayer).called(1);
|
|
|
|
|
});
|
|
|
|
@ -152,12 +150,10 @@ void main() {
|
|
|
|
|
final callback = TestRampOpeningBallContactCallback();
|
|
|
|
|
|
|
|
|
|
when(() => ball.body).thenReturn(body);
|
|
|
|
|
when(() => ball.priority).thenReturn(1);
|
|
|
|
|
when(() => body.position).thenReturn(Vector2.zero());
|
|
|
|
|
when(() => ball.layer).thenReturn(Layer.board);
|
|
|
|
|
|
|
|
|
|
await game.ready();
|
|
|
|
|
await game.ensureAdd(area);
|
|
|
|
|
|
|
|
|
|
callback.begin(ball, area, MockContact());
|
|
|
|
|
verify(() => ball.layer = area.pathwayLayer).called(1);
|
|
|
|
|
});
|
|
|
|
@ -174,13 +170,11 @@ void main() {
|
|
|
|
|
final callback = TestRampOpeningBallContactCallback();
|
|
|
|
|
|
|
|
|
|
when(() => ball.body).thenReturn(body);
|
|
|
|
|
when(() => ball.priority).thenReturn(1);
|
|
|
|
|
when(() => body.position).thenReturn(Vector2.zero());
|
|
|
|
|
when(() => body.linearVelocity).thenReturn(Vector2(0, -1));
|
|
|
|
|
when(() => ball.layer).thenReturn(Layer.board);
|
|
|
|
|
|
|
|
|
|
await game.ready();
|
|
|
|
|
await game.ensureAdd(area);
|
|
|
|
|
|
|
|
|
|
callback.begin(ball, area, MockContact());
|
|
|
|
|
verify(() => ball.layer = area.pathwayLayer).called(1);
|
|
|
|
|
|
|
|
|
@ -200,13 +194,11 @@ void main() {
|
|
|
|
|
final callback = TestRampOpeningBallContactCallback();
|
|
|
|
|
|
|
|
|
|
when(() => ball.body).thenReturn(body);
|
|
|
|
|
when(() => ball.priority).thenReturn(1);
|
|
|
|
|
when(() => body.position).thenReturn(Vector2.zero());
|
|
|
|
|
when(() => body.linearVelocity).thenReturn(Vector2(0, 1));
|
|
|
|
|
when(() => ball.layer).thenReturn(Layer.board);
|
|
|
|
|
|
|
|
|
|
await game.ready();
|
|
|
|
|
await game.ensureAdd(area);
|
|
|
|
|
|
|
|
|
|
callback.begin(ball, area, MockContact());
|
|
|
|
|
verify(() => ball.layer = area.pathwayLayer).called(1);
|
|
|
|
|
|
|
|
|
@ -226,13 +218,11 @@ void main() {
|
|
|
|
|
final callback = TestRampOpeningBallContactCallback();
|
|
|
|
|
|
|
|
|
|
when(() => ball.body).thenReturn(body);
|
|
|
|
|
when(() => ball.priority).thenReturn(1);
|
|
|
|
|
when(() => body.position).thenReturn(Vector2.zero());
|
|
|
|
|
when(() => body.linearVelocity).thenReturn(Vector2(0, 1));
|
|
|
|
|
when(() => ball.layer).thenReturn(Layer.board);
|
|
|
|
|
|
|
|
|
|
await game.ready();
|
|
|
|
|
await game.ensureAdd(area);
|
|
|
|
|
|
|
|
|
|
callback.begin(ball, area, MockContact());
|
|
|
|
|
verify(() => ball.layer = area.pathwayLayer).called(1);
|
|
|
|
|
|
|
|
|
|