public void DataRepositoryEditEventTest() { repository.EditEvent(new Data.RentEvent(1, new Data.Client(1, "Bartosz", "Wlodarczyk", 25), date_2, new Data.Book(4, "Maly Ksiaze", "Saint-Exupery", 120, Data.BookGenre.Childrens, date_1))); Assert.AreEqual(1, repository.GetEvent(1).Id); Assert.AreEqual(1, repository.GetEvent(1).Client.Id); Assert.AreEqual("Bartosz", repository.GetEvent(1).Client.Name); Assert.AreEqual("Wlodarczyk", repository.GetEvent(1).Client.Surname); Assert.AreEqual(25, repository.GetEvent(1).Client.Age); Assert.AreEqual(date_2, repository.GetEvent(1).Date); repository.EditEvent(new Data.RentEvent(2, new Data.Client(2, "Marco", "Murinho", 37), date_1, new Data.Book(4, "Maly Ksiaze", "Saint-Exupery", 120, Data.BookGenre.Childrens, date_1))); Assert.AreEqual(2, repository.GetEvent(2).Id); Assert.AreEqual(2, repository.GetEvent(2).Client.Id); Assert.AreEqual("Marco", repository.GetEvent(2).Client.Name); Assert.AreEqual("Murinho", repository.GetEvent(2).Client.Surname); Assert.AreEqual(37, repository.GetEvent(2).Client.Age); Assert.AreEqual(date_1, repository.GetEvent(2).Date); }
public void EditEvent(Data.Event newEvent) { repository.EditEvent(newEvent); }