public void Should_be_able_to_insert_new_registration_for_customer() { IRegistrationDataMapper mapper = CreateSUT( ); long customerId = CreateCustomerRecord( ); IRegistration expectedRegistration = new CustomerRegistration("mokhan", "password", "mo", "khan", "4036813389", "calgary"); mapper.Insert(expectedRegistration, customerId); IRegistration actualRegistration = mapper.For(customerId); Assert.AreEqual(expectedRegistration, actualRegistration); }
public void Should_be_able_to_update_record() { IRegistrationDataMapper mapper = CreateSUT( ); long customerId = CreateCustomerRecord( ); IRegistration firstRegistration = new CustomerRegistration("mokhan", "password", "mo", "khan", "4036813389", "calgary"); IRegistration expectedRegistration = new CustomerRegistration("khanmo", "wordpass", "om", "ankh", "1338940368", "garycal"); mapper.Insert(firstRegistration, customerId); mapper.Update(expectedRegistration, customerId); IRegistration actualRegistration = mapper.For(customerId); Assert.AreEqual(expectedRegistration, actualRegistration); }