Пример #1
0
        public void AddingCustomerShouldNotTakeMoreThan50Milliseconds()
        {
            CustomerBook customerBook   = new CustomerBook();
            String       nombreCustomer = "John Lennon";

            TakesLessThan(TimeTakenBy(() => customerBook.addCustomerNamed(nombreCustomer)), 50);
        }
Пример #2
0
        public void CanNotAddACustomerWithEmptyName()
        {
            CustomerBook customerBook = new CustomerBook();

            shouldThrowWithExceptionDo <Exception>(() => customerBook.addCustomerNamed(""),
                                                   (exceptionMessage) => CheckErrorMessageAndEmptyCustomer(CustomerBook.CUSTOMER_NAME_EMPTY, customerBook, exceptionMessage));
        }
Пример #3
0
        public void RemovingCustomerShouldNotTakeMoreThan100Milliseconds()
        {
            CustomerBook customerBook   = new CustomerBook();
            String       nombreCustomer = "Paul McCartney";

            customerBook.addCustomerNamed(nombreCustomer);
            TakesLessThan(TimeTakenBy(() => customerBook.removeCustomerNamed(nombreCustomer)), 100);
        }
Пример #4
0
        public void RemovingCustomerShouldNotTakeMoreThan100Milliseconds()
        {
            CustomerBook customerBook  = new CustomerBook();
            String       paulMcCartney = "Paul McCartney";

            customerBook.addCustomerNamed(paulMcCartney);

            FunctionShouldTakeLessThan(() => customerBook.removeCustomerNamed(paulMcCartney), 100);
        }
Пример #5
0
        public void AddingCustomerShouldNotTakeMoreThan50Milliseconds()
        {
            CustomerBook customerBook = new CustomerBook();

            FunctionShouldTakeLessThan(() => customerBook.addCustomerNamed("paulMcCartney"), 50);
        }
Пример #6
0
        public void CanNotAddACustomerWithEmptyName()
        {
            CustomerBook customerBook = new CustomerBook();

            MustFail <Exception>(() => customerBook.addCustomerNamed(""), CustomerBook.CUSTOMER_NAME_EMPTY, customerBook);
        }
        public void AddPaulMcCartneyToCustomerBook(CustomerBook customerBookForTesting)
        {
            String paulMcCartney = "Paul McCartney";

            customerBookForTesting.addCustomerNamed(paulMcCartney);
        }
 public void AddNoNamedToCustomerBook(CustomerBook customerBookForTesting)
 {
     customerBookForTesting.addCustomerNamed("");
 }
        public void AddJonhLennonToCustomerBook(CustomerBook customerBookForTesting)
        {
            String johnLennon = "John Lennon";

            customerBookForTesting.addCustomerNamed(johnLennon);
        }