public void FindByName_FindAttractionsInDatabase_AttractionList() { //Arrange Attraction testAttraction = new Attraction("testName", 1, "testDescription"); testAttraction.Save(); List <Attraction> testList = new List <Attraction> { testAttraction }; //Act List <Attraction> resultList = Attraction.FindByName(testAttraction.GetName()); //Assert CollectionAssert.AreEqual(testList, resultList); }
public void GetTest_ReturnDataField() { // Arrange int id = 1; string name = "testAttraction"; int cityId = 1; string description = ""; Attraction testAttraction = new Attraction(name, cityId, description, id); // Act int resultId = testAttraction.GetId(); string resultName = testAttraction.GetName(); int resultCityId = testAttraction.GetCityId(); string resultDescription = testAttraction.GetDescription(); // Assert Assert.AreEqual(id, resultId); Assert.AreEqual(name, resultName); Assert.AreEqual(cityId, resultCityId); Assert.AreEqual(description, resultDescription); }