Exemplo n.º 1
0
        public void GivenSingleTwoSidedMirrorWhenReadThenMazeHasOneMirror()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithSingleTwoSidedMirror());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

            AssertDimensions();
            AssertSingleTwoSidedMirror();
            AssertLaserStart();
        }
Exemplo n.º 2
0
        public void GivenMultipleMirrorTypesWhenReadThenMazeHasMultipleMirrorTypes()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithMultipleMirrorTypes());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

            AssertDimensions();
            AssertMultipleMirrorTypes();
            AssertLaserStart();
        }
Exemplo n.º 3
0
        public void GivenNoMirrorsWhenReadThenMazeHasDimensionsAndLaserStartButNoMirrors()
        {
            fakeStreamReader = new FakeStreamReader(CreateQueueWithNoMirrors());
            mazeFileReader   = new MazeReader(fakeStreamReader);

            mazeFileReader.Read(mazeParams);

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