public void ShouldCreateAProfile() { IVRProfile profileToCreate = new IVRProfile() { ProfileId = 1000001, FullName = "basil", PIN = "1234" }; ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING); var result = repository.Create(profileToCreate); Assert.IsNotNull(result); }
public void ShouldUpdateProfile() { IVRProfile profile = new IVRProfile() { ProfileId = 11112, Culture = "en", PIN = "1234", FullName = "Basil", PhoneNumber = "+22222221" }; ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING); var createdEntity = repository.Create(profile); createdEntity.Culture = "fr"; createdEntity.PhoneNumber = "+1111112"; createdEntity.PIN = "4321"; repository.Update(createdEntity); var updatedEntity = repository.Get(11112); Assert.AreEqual(createdEntity.Culture, updatedEntity.Culture); Assert.AreEqual(createdEntity.PhoneNumber, updatedEntity.PhoneNumber); Assert.AreEqual(createdEntity.PIN, updatedEntity.PIN); }