test: fixed priority test changes

pull/83/head
RuiAlonso 4 years ago
parent b2741a3461
commit 2d804866fb

@ -36,25 +36,30 @@ void main() {
group('SpaceshipEntranceBallContactCallback', () { group('SpaceshipEntranceBallContactCallback', () {
test('changes the ball priority on contact', () { test('changes the ball priority on contact', () {
when(() => ball.priority).thenReturn(1);
when(() => entrance.priority).thenReturn(2);
SpaceshipEntranceBallContactCallback().begin( SpaceshipEntranceBallContactCallback().begin(
entrance, entrance,
ball, ball,
MockContact(), MockContact(),
); );
verify(() => ball.elevation = Elevation.spaceship.order).called(1); verify(() => ball.showInFrontOf(entrance)).called(1);
}); });
}); });
group('SpaceshipHoleBallContactCallback', () { group('SpaceshipHoleBallContactCallback', () {
test('changes the ball priority on contact', () { test('changes the ball priority on contact', () {
when(() => ball.priority).thenReturn(1);
SpaceshipHoleBallContactCallback().begin( SpaceshipHoleBallContactCallback().begin(
hole, hole,
ball, ball,
MockContact(), MockContact(),
); );
verify(() => ball.elevation = Elevation.board.order).called(1); verify(() => ball.sendToBack()).called(1);
}); });
}); });
}); });

Loading…
Cancel
Save