Example #1
0
        public void Handle_WhenHandlingCohortAssignedToEmployerEventHandlerForLegacyTaskCounterWhenActionWasByProvider_ThenShouldThrowException()
        {
            var f = new CohortAssignedToEmployerEventHandlerForLegacyTaskCounterTestsFixture().LastAssignedParty(Party.Provider);

            Assert.ThrowsAsync <InvalidOperationException>(() => f.Handle());
            Assert.IsTrue(f.Logger.HasErrors);
        }
Example #2
0
        public async Task Handle_WhenHandlingCohortAssignedToEmployerEventHandlerForLegacyTaskCounterWhenActionWasByProvider_ThenShouldNotEmitLegacyEventWhenAssigningPartyIsNotProvider(Party assigningParty)
        {
            var f = new CohortAssignedToEmployerEventHandlerForLegacyTaskCounterTestsFixture().AddCohortToMemoryDb().LastAssignedParty(assigningParty);
            await f.Handle();

            f.VerifyLegacyEventCohortApprovalRequestedByProviderIsNotSent();
        }