Beispiel #1
0
        public void RandomDataFillerLengthDataTest()
        {
            RandomDataFiller randomDataFiller = new RandomDataFiller(8, 20, 6);
            DataRepository   dataRepository   = new DataRepository(randomDataFiller);

            Assert.Equal(8, dataRepository.GetAllBooks().Count());
            Assert.Equal(8, dataRepository.GetAllCopyDetails().Count());
            Assert.Equal(20, dataRepository.GetAllEvents().Count());
            Assert.Equal(6, dataRepository.GetAllClients().Count());
        }
Beispiel #2
0
        public void GetClientInvalidValue()
        {
            IDataFiller     randomDataFiller = new RandomDataFiller(2, 9, 1);
            IDataRepository dataRepository   = new DataRepository(randomDataFiller);

            const string email       = "student.gmail.com";
            const string firstName   = "Lolek";
            const string secondName  = "Bolek";
            const string phoneNumber = "123456789";
            Client       client      = new Client(email, firstName, secondName, phoneNumber);

            Assert.Throws <ArgumentException>(() => dataRepository.GetClient(dataRepository.FindClient(client)));
        }