Example #1
0
        public void If_Api_Call_Unsuccesful_Should_Log_Error()
        {
            //Arrange
            var fixture = new ApprenticeshipCompletionDateUpdatedEventFixture(false).SetGetApprenticeshipService().SetCommitmentsApiModelException();

            //Act
            fixture.RunEventWithCommitmentsApiModelException();

            //Assert
            fixture.VerifyCommitmentsApiModelExceptionExceptionLogged();
        }
Example #2
0
        public async Task If_Apprenticeship_NotExists_Then_CreateRecord()
        {
            //Arrange
            var fixture = new ApprenticeshipCompletionDateUpdatedEventFixture(true).SetGetApprenticeshipService();

            //Act
            await fixture.Run();

            //Assert
            fixture.AssertRecordCreated();
        }
Example #3
0
        public void If_Event_Errors_Should_Log_Error()
        {
            //Arrange
            var fixture = new ApprenticeshipCompletionDateUpdatedEventFixture(false).SetGetApprenticeshipService().SetException();

            //Act
            fixture.RunEventWithException();

            //Assert
            fixture.VerifyExceptionLogged();
        }
Example #4
0
        public async Task Then_Update_Status()
        {
            //Arrange
            var fixture = new ApprenticeshipCompletionDateUpdatedEventFixture(false);

            //Act
            await fixture.Run();

            //Assert
            fixture.AssertStatus();
        }