Beispiel #1
0
        public void idsAreConsecutive()
        {
            IdFactory IdFactory = new IdFactory();

            Assert.AreEqual(100, IdFactory.getNextID());
            Assert.AreEqual(101, IdFactory.getNextID());
            Assert.AreEqual(102, IdFactory.getNextID());
        }
 /// <summary>
 /// Add a customer, given a contact.
 /// The customer is created from the contact plus a generated ID.
 /// </summary>
 /// <param name="contact"></param>
 public void AddCustomer(Contact contact)
 {
     _customers.Add(new Customer(contact, _idFactory.getNextID()));
 }