Esempio n. 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();
        }
Esempio n. 2
0
        public async Task If_Apprenticeship_NotExists_Then_CreateRecord()
        {
            //Arrange
            var fixture = new ApprenticeshipCompletionDateUpdatedEventFixture(true).SetGetApprenticeshipService();

            //Act
            await fixture.Run();

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

            //Act
            fixture.RunEventWithException();

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

            //Act
            await fixture.Run();

            //Assert
            fixture.AssertStatus();
        }