Exemple #1
0
        public void CanNotRemoveNotAddedCustomer()
        {
            CustomerBook aCustomerBook = new CustomerBook();
            CheckInAndCheckOutCustomersForTesting someTest      = new CheckInAndCheckOutCustomersForTesting();
            CatchExceptionsForTesting             catchingATest = new CatchExceptionsForTesting();

            CustomerBookTestingExceptionCatcher.TryCustomerBookActionForTesting(aCustomerBook, someTest.RemoveJonhLennonFromCustomerBook, catchingATest.CatchRemovingNotAddedCustomer);
        }
Exemple #2
0
        public void CanNotAddACustomerWithEmptyName()
        {
            CustomerBook aCustomerBook = new CustomerBook();
            CheckInAndCheckOutCustomersForTesting someTest      = new CheckInAndCheckOutCustomersForTesting();
            CatchExceptionsForTesting             catchingATest = new CatchExceptionsForTesting();

            CustomerBookTestingExceptionCatcher.TryCustomerBookActionForTesting(aCustomerBook, someTest.AddNoNamedToCustomerBook, catchingATest.CatchAddingACustomerWithEmptyName);
        }
Exemple #3
0
        public void AddingCustomerShouldNotTakeMoreThan50Milliseconds()
        {
            CustomerBook aCustomerBook = new CustomerBook();
            CheckInAndCheckOutCustomersForTesting someTest = new CheckInAndCheckOutCustomersForTesting();

            Chronometer chronometer = new Chronometer();

            chronometer.CustomerActionShouldNotTakeMoreThanSomeMilliseconds(aCustomerBook, someTest.AddJonhLennonToCustomerBook, 50);
        }
Exemple #4
0
        public void RemovingCustomerShouldNotTakeMoreThan100Milliseconds()
        {
            CustomerBook aCustomerBook = new CustomerBook();
            CheckInAndCheckOutCustomersForTesting someTest = new CheckInAndCheckOutCustomersForTesting();

            someTest.AddPaulMcCartneyToCustomerBook(aCustomerBook);

            Chronometer chronometer = new Chronometer();

            chronometer.CustomerActionShouldNotTakeMoreThanSomeMilliseconds(aCustomerBook, someTest.RemovePaulMcCartneyFromCustomerBook, 100);
        }