public void GetOutingByDate_ShouldReturnCorrectOuting() //Read { //Arrange Outing_Repo repo = new Outing_Repo(); Outing outing = new Outing(new DateTime(2008, 3, 15), EventType.Bowling, 100, 3000m); repo.AddOuting(outing); DateTime date = new DateTime(2008, 3, 15); //Act Outing result = repo.GetOutingByDate(date); //Assert Assert.AreEqual(result.EventDate, date); }
public void DeleteExistingOuting_ShouldReturnTrue() //Delete { //Arrange Outing_Repo repo = new Outing_Repo(); Outing outing = new Outing(new DateTime(2008, 3, 15), EventType.Bowling, 100, 3000m); repo.AddOuting(outing); DateTime date = new DateTime(2008, 3, 15); //Act Outing oldOuting = repo.GetOutingByDate(date); bool removeResult = repo.DeleteExistingOuting(oldOuting); //Assert Assert.IsTrue(removeResult); }