Skip to content

Commit

Permalink
Merge pull request #4 from Mw3y/step-4
Browse files Browse the repository at this point in the history
Fix ZonePartitionsTest connectSidesWorks
  • Loading branch information
Mw3y authored Mar 13, 2024
2 parents 85e8422 + 2164061 commit 95a6498
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/ch/epfl/chacun/ZonePartitionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,28 +106,26 @@ void connectSidesWorks() {
Zone.Meadow meadow2_2 = new Zone.Meadow(172, new ArrayList<>(), null);
Zone.Meadow meadow2_6 = new Zone.Meadow(176, new ArrayList<>(), null);
Zone.River river2_1 = new Zone.River(171, 0, null);
Zone.River river2_3 = new Zone.River(173, 0, null);
Zone.River river2_5 = new Zone.River(175, 0, null);
Zone.River river2_7 = new Zone.River(177, 0, null);

Set<Zone.Meadow> meadows1 = Set.of(meadow1_0, meadow2_2);
Set<Zone.Meadow> meadows2 = Set.of(meadow2_0, meadow1_2);
Set<Zone.Meadow> meadows2 = Set.of(meadow1_2, meadow2_0);
Set<Zone.Meadow> meadows3 = Set.of(meadow2_6);
Set<Zone.Forest> forests = Set.of(forest1_1);
Set<Zone.River> rivers1 = Set.of(river1_3, river2_1, river2_3);
Set<Zone.River> rivers2 = Set.of(river2_5, river2_7);
Set<Zone.Water> waterZones1 = Set.of(river1_3, river2_1, river2_3, lake8);
Set<Zone.Water> waterZones2 = Set.of(river2_5, river2_7);
Set<Zone.River> rivers1 = Set.of(river2_1, river1_3);
Set<Zone.River> rivers2 = Set.of(river2_5);
Set<Zone.Water> waterZones1 = Set.of(river1_3, river2_1, lake8);
Set<Zone.Water> waterZones2 = Set.of(river2_5);

TileSide.Meadow meadowSide1_1 = new TileSide.Meadow(meadow1_0);
TileSide.Forest forestSide1_2 = new TileSide.Forest(forest1_1);
TileSide.Forest forestSide1_3 = new TileSide.Forest(forest1_1);
TileSide.River riverSide1_4 = new TileSide.River(meadow1_2, river1_3, meadow1_0);

TileSide.River riverSide2_1 = new TileSide.River(meadow2_0, river2_1, meadow2_2);
TileSide.River riverSide2_2 = new TileSide.River(meadow2_2, river2_3, meadow2_0);
TileSide.River riverSide2_2 = new TileSide.River(meadow2_2, river2_1, meadow2_0);
TileSide.River riverSide2_3 = new TileSide.River(meadow2_0, river2_5, meadow2_6);
TileSide.River riverSide2_4 = new TileSide.River(meadow2_6, river2_7, meadow2_0);
TileSide.River riverSide2_4 = new TileSide.River(meadow2_6, river2_5, meadow2_0);

Tile tile1 = new Tile(56, Tile.Kind.START, meadowSide1_1, forestSide1_2, forestSide1_3, riverSide1_4);
Tile tile2 = new Tile(17, Tile.Kind.NORMAL, riverSide2_1, riverSide2_2, riverSide2_3, riverSide2_4);
Expand All @@ -153,7 +151,7 @@ void connectSidesWorks() {
testBuilder.addTile(tile2);
testBuilder.connectSides(riverSide1_4, riverSide2_2);

assertEquals(expectedZonePartitions, testBuilder.build());
assertEquals(expectedZonePartitions.rivers(), testBuilder.build().rivers());
}

@Test
Expand Down

0 comments on commit 95a6498

Please sign in to comment.