public void Handle_WhenHandlingCohortAssignedToEmployerEventHandlerForLegacyTaskCounterWhenActionWasByProvider_ThenShouldThrowException() { var f = new CohortAssignedToEmployerEventHandlerForLegacyTaskCounterTestsFixture().LastAssignedParty(Party.Provider); Assert.ThrowsAsync <InvalidOperationException>(() => f.Handle()); Assert.IsTrue(f.Logger.HasErrors); }
public async Task Handle_WhenHandlingCohortAssignedToEmployerEventHandlerForLegacyTaskCounterWhenActionWasByProvider_ThenShouldNotEmitLegacyEventWhenAssigningPartyIsNotProvider(Party assigningParty) { var f = new CohortAssignedToEmployerEventHandlerForLegacyTaskCounterTestsFixture().AddCohortToMemoryDb().LastAssignedParty(assigningParty); await f.Handle(); f.VerifyLegacyEventCohortApprovalRequestedByProviderIsNotSent(); }