예제 #1
0
        public void GivenSingleTwoSidedMirrorWhenReadThenMazeHasOneMirror()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithSingleTwoSidedMirror());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

            AssertDimensions();
            AssertSingleTwoSidedMirror();
            AssertLaserStart();
        }
예제 #2
0
        public void GivenMultipleMirrorTypesWhenReadThenMazeHasMultipleMirrorTypes()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithMultipleMirrorTypes());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

            AssertDimensions();
            AssertMultipleMirrorTypes();
            AssertLaserStart();
        }
예제 #3
0
        public void GivenNoMirrorsWhenReadThenMazeHasDimensionsAndLaserStartButNoMirrors()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithNoMirrors());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

            AssertDimensions();
            Assert.IsEmpty(mazeParams.Mirrors);
            AssertLaserStart();
        }