public async Task Update_should_not_invoke_events_if_silent() { var update = new UserValues(); var identity = CreateIdentity(found: true); await sut.UpdateAsync(identity.Id, update, true); A.CallTo(() => userEvents.OnUserUpdatedAsync(A <IUser> .That.Matches(x => x.Identity == identity), A <IUser> ._)) .MustNotHaveHappened(); }
public async Task Update_should_do_nothing_for_new_update() { var update = new UserValues(); var identity = CreateIdentity(found: true); await sut.UpdateAsync(identity.Id, update, ct : ct); A.CallTo(() => userEvents.OnUserUpdatedAsync(A <IUser> .That.Matches(x => x.Identity == identity), A <IUser> ._)) .MustHaveHappened(); }