public void FirstRegisterShouldBeReturnedWhenItHasTheShorterLine()
        {
            Register register1 = new Register(1);
            register1.AddCustomerToLine(_testHelper.GetDefaultCustomer());

            Register register2 = new Register(1);
            register2.AddCustomerToLine(_testHelper.GetDefaultCustomer());
            register2.AddCustomerToLine(_testHelper.GetDefaultCustomer());

            Register betterRegister = _shorterLineStrategy.GetBetterRegister(register1, register2);

            Assert.AreEqual(register1, betterRegister);
        }
        public void LastCustomerInLineShouldReturnTheMostRecentCustomerAdded()
        {
            Register register = new Register(1);
            Customer customer1 = new Customer(new ShorterLineStrategy(), Customer.TypeAPriorityLevel, 1, 1);
            Customer customer2 = new Customer(new ShorterLineStrategy(), Customer.TypeAPriorityLevel, 1, 1);

            register.AddCustomerToLine(customer1);

            Assert.AreEqual(customer1, register.LastCustomerInLine);

            register.AddCustomerToLine(customer2);

            Assert.AreEqual(customer2, register.LastCustomerInLine);
        }
 public void RegisterShouldNotHaveCustomersWhenSufficientTimeHasPassedToProcessItem()
 {
     Register register = new Register(1);
     Customer customer = new Customer(new ShorterLineStrategy(), Customer.TypeAPriorityLevel, 1, 1);
     register.AddCustomerToLine(customer);
     Assert.IsTrue(register.HasCustomers);
     register.ProcessOneMinute();
     Assert.IsFalse(register.HasCustomers);
 }
 public void HasCustomersShouldBeTrueWhenACustomerHasJustBeenAdded()
 {
     Register register = new Register(1);
     register.AddCustomerToLine(new Customer(new ShorterLineStrategy(), Customer.TypeAPriorityLevel, 1, 1));
     Assert.IsTrue(register.HasCustomers);
 }