Example #1
0
        public void CheckIfMuseumOneIsCreatedWithRightNumberOfRooms()
        {
            //Arrange

            //Build the test museum
            OmodernaMuseet builder    = new OmodernaMuseet();
            Museum         testMuseum = builder.BuildOmodernaMuseet();
            //Get the list of rooms in the museum
            List <Room> listOfRooms = testMuseum.GetListOfRooms();

            //Act
            int numberOfRooms = listOfRooms.Count;

            //Assert
            Assert.Equal(8, numberOfRooms);
        }
Example #2
0
        public void CheckIfMuseumTwoIsCreatedWithRightNumberOfRooms()
        {
            //Arrange

            //Build the test museum
            ZornMuseet builder    = new ZornMuseet();
            Museum     testMuseum = builder.BuildZornMuseet();
            //Get the list of rooms in the museum
            List <Room> listOfRooms = testMuseum.GetListOfRooms();

            //Act
            int numberOfRooms      = listOfRooms.Count;
            int rightNumberOfRooms = 4;

            //Assert
            Assert.Equal(rightNumberOfRooms, numberOfRooms);
        }
Example #3
0
        public void CheckIfEachRoomHaveOneAdjoiningRoom()
        {
            //Arrange
            //Build the test museum
            OmodernaMuseet builder    = new OmodernaMuseet();
            Museum         testMuseum = builder.BuildOmodernaMuseet();
            //Get the list of rooms in the museum
            List <Room> listOfRooms = testMuseum.GetListOfRooms();

            //Act
            foreach (var room in listOfRooms)
            {
                //Get the list of adjoining rooms
                List <Room> adjoiningRooms         = room.GetAdjoiningRooms();
                int         numberOfAdjoiningRooms = adjoiningRooms.Count;

                //Assert
                //Check that adjoining rooms is greater than zero in each room
                Assert.True(numberOfAdjoiningRooms > 0);
            }
        }
        public void CheckIfEachMuseumHaveExpextedAmountOfArtworks()
        {
            //Arrange

            //Build the test museum
            OmodernaMuseet builder    = new OmodernaMuseet();
            Museum         testMuseum = builder.BuildOmodernaMuseet();
            //Get the list of rooms in the museum
            List <Room> listOfRooms = testMuseum.GetListOfRooms();

            //Act
            int numberOfArtworks = 0;

            foreach (var room in listOfRooms)
            {
                //Get the list of artworks for each room
                List <Artwork> artworks = room.GetArtworks();
                numberOfArtworks = numberOfArtworks + artworks.Count;
            }

            //Assert
            //Check that the total amount of artworks in the museum is 11
            Assert.Equal(11, numberOfArtworks);
        }