Skip to content
Snippets Groups Projects
Commit d7ce6921 authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

Added tests for RotatedTile

parent 673e1c91
No related branches found
No related tags found
No related merge requests found
package model;
import javafx.scene.paint.Color;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class RotatedTileTest {
@Test
void testSide(){
Tile wangTile = new WangTile(new Side[]{new ColoredSide(Color.BLACK), new ColoredSide(Color.BLUE),
new ColoredSide(Color.WHITE), new ColoredSide(Color.RED)});
for(Rotation rotation : Rotation.values()){
RotatedTile rotatedTile = new RotatedTile(wangTile, rotation);
for (CardinalDirection direction : CardinalDirection.values()) {
assertThat(rotatedTile.side(direction)).isEqualTo(wangTile.side(rotation.rotatedDirection(direction)));
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment