public void Test4_AssignedIDTOObjects() { //Arrange, Act Restaurant testRestaurant = new Restaurant("Burger King", "Seattle", 1); //Act testRestaurant.Save(); Restaurant saveRestaurant = Restaurant.GetAll()[0]; int result = saveRestaurant.GetId(); int testId = testRestaurant.GetId(); //Assert Assert.Equal(testId, result); }
public void Test5_Find_FindsRestaurantInDatabase() { //Arrange Restaurant testRestaurant = new Restaurant("Burger King", "Seattle", 2); testRestaurant.Save(); //Act Restaurant foundRestaurant = Restaurant.Find(testRestaurant.GetId()); //Assert Assert.Equal(testRestaurant, foundRestaurant); }