public void TestThatSwitchingPropagationListsWorks() { CoastlineGenerationListAltenator testCandidate = new CoastlineGenerationListAltenator(); List <CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary> firstPropagationList = testCandidate.GetCurrentCoastLinePropagationSectors(); testCandidate.SwitchToNextPropagationList(); List <CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary> secondPropagationList = testCandidate.GetCurrentCoastLinePropagationSectors(); testCandidate.SwitchToNextPropagationList(); List <CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary> thirdPropagationList = testCandidate.GetCurrentCoastLinePropagationSectors(); Assert.That(firstPropagationList, Is.SameAs(thirdPropagationList)); Assert.That(secondPropagationList, Is.Not.SameAs(thirdPropagationList)); }
public void TestThatPuttingSectorsIntoListsWorks() { CoastlineGenerationListAltenator testCandidate = new CoastlineGenerationListAltenator(); CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary sector1 = new CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary(0, 0, 3, 0, 3); CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary sector2 = new CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary(0, 0, 1, 0, 1); testCandidate.PutSector(sector1); List <CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary> firstPropagationList = testCandidate.GetCurrentCoastLinePropagationSectors(); Assert.That(testCandidate.ContainsSectorInCurrents(sector1), Is.True); testCandidate.SwitchToNextPropagationList(); testCandidate.PutSector(sector2); List <CoastlineHeightMapGenerator.CoastLineCreationSectorBoundary> secondPropagationList = testCandidate.GetCurrentCoastLinePropagationSectors(); Assert.That(testCandidate.ContainsSectorInCurrents(sector2), Is.True); }