예제 #1
0
        public void MapFrom_Should_ReturnCorrectInstanceOf_TheatreViewModel()
        {
            //Arrange
            var sut = new SearchTheatreViewModelMapper();

            var theatre = new SearchTheatre
            {
                Id            = Guid.NewGuid(),
                Name          = "testName",
                Location      = "testLocation",
                AverageRating = 5,
            };

            //Act
            var result = sut.MapFrom(theatre);

            //Assert
            Assert.IsInstanceOfType(result, typeof(TheatreViewModel));
        }
예제 #2
0
        public void MapFrom_Should_Return_CorrectInstanceOf_TheatreViewModel()
        {
            //Arrange
            var sut = new SearchTheatreViewModelMapper();

            var theatre = new SearchTheatre
            {
                Id            = Guid.NewGuid(),
                Name          = "testName",
                Location      = "testLocation",
                AverageRating = 5,
            };

            //Act
            var result = sut.MapFrom(theatre);

            //Assert
            Assert.AreEqual(result.Id, theatre.Id);
            Assert.AreEqual(result.Name, theatre.Name);
            Assert.AreEqual(result.Location, theatre.Location);
            Assert.AreEqual(result.AverageRating, theatre.AverageRating);
        }