Exemplo n.º 1
0
        public void DataRepositoryRentEventTest()
        {
            repository.AddBook(new Data.Book(6, "Michal Ksiaze", "Saint-Exupery", 120, Data.BookGenre.Childrens, date_1));
            repository.AddClient(new Data.Client(6, "Bartosz", "Wlodarski", 20));
            repository.RentEvent(1, new Data.Client(6, "Bartosz", "Wlodarski", 20), new DateTime(2018, 10, 20), new Data.Book(6, "Michal Ksiaze", "Saint-Exupery", 120, Data.BookGenre.Childrens, date_1));

            Assert.IsFalse(repository.CheckAvaiability(new Data.Book(6, "Michal Ksiaze", "Saint-Exupery", 120, Data.BookGenre.Childrens, date_1)));
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            context    = new Data.DataContext();
            repository = new Data.DataRepository(context);

            repository.AddClient(new Data.Client(1, "Bartlomiej", "Wlodarski", 20));
            repository.AddClient(new Data.Client(2, "Maciej", "Wlodarczyk", 21));
            repository.AddClient(new Data.Client(3, "Jan", "Kowalski", 40));
        }
Exemplo n.º 3
0
        public void DataRepositoryAddClientTest()
        {
            Assert.AreEqual(3, repository.GetClientsNumber());

            repository.AddClient(new Data.Client(4, "Mateusz", "Owczarek", 22));
            repository.AddClient(new Data.Client(5, "Maciej", "Kopa", 16));
            repository.AddClient(new Data.Client(6, "Monika", "Roksa", 23));

            Assert.AreEqual(6, repository.GetClientsNumber());
        }
Exemplo n.º 4
0
 //clients
 public void AddClient(Data.Client client)
 {
     repository.AddClient(client);
 }