public void CinemaFactory_Should_Create_Cinema() { //Arrange var cinemaFactory = new Game1.Design_Patterns.CinemaFactory(); var item = new AddItemsInProps { //set necessary properties here }; //Act var actual = cinemaFactory.createspace(item); //Assert Assert.IsNotNull(actual); //...you can also compare property values from item and actual for equality Assert.AreEqual(item.AreaType, actual.AreaType); //... }
public void GivenItemProps_WhenCreatingSpace_ShouldReturnExpectedSpace( string areaType, string position, string dimension ) { // arrange var factory = new Game1.Design_Patterns.CinemaFactory(); var props = new AddItemsInProps { AreaType = areaType, Position = position, Dimension = dimension }; // act Space cinema = factory.createspace(props); // assert var expectedCinema = new Cinema(areaType, position, dimension); cinema.Should().BeEquivalentTo(expectedCinema); }