public void Update_EntityExists_EntityIsUpdated() { using(var store = new Store(BuildConfiguration())) { OnStoreCreate(store); using(var steps = new Steps(store)) { var person = CreatePerson(1); // Arrange steps.BeginConversation(); steps.AddPeopleToStore(new Person[] { person }); // Act steps.UpdatePerson(person); // Assert steps.VerifyPersonExists(person); } } }
public void Update_EntityDoesntExists_ThrowInvalidOperationException() { using(var store = new Store(BuildConfiguration())) { OnStoreCreate(store); using(var steps = new Steps(store)) { var person = CreatePerson(1); // Arrange steps.BeginConversation(); // Act Assert.Throws<InvalidOperationException>(() => steps.UpdatePerson(person)); } } }