Beispiel #1
0
        public async Task ULN_IsMapped(ConfirmStopRequest request)
        {
            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(ExpectedUln, result.ULN);
        }
Beispiel #2
0
        public async Task ApprenticeName_IsMapped(ConfirmStopRequest request)
        {
            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(ExpectedFullName, result.ApprenticeName);
        }
Beispiel #3
0
        public async Task MadeRedundant_IsMapped(ConfirmStopRequest request)
        {
            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(request.MadeRedundant, result.MadeRedundant);
        }
Beispiel #4
0
        public async Task AccountHashedId_IsMapped(ConfirmStopRequest request)
        {
            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(request.AccountHashedId, result.AccountHashedId);
        }
Beispiel #5
0
        public async Task WhenApprenticeship_Status_IsWaitingToStart_StopDate_IsMapped(ConfirmStopRequest request)
        {
            ApprenticeshipDetails.Status = CommitmentsV2.Types.ApprenticeshipStatus.WaitingToStart;
            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(ExpectedStartDateTime, result.StopDate);
        }
Beispiel #6
0
        public async Task WhenApprenticeship_Status_IsLive_StopDate_IsMapped(ConfirmStopRequest request)
        {
            request.StopMonth            = 6;
            request.StopYear             = 2020;
            ApprenticeshipDetails.Status = CommitmentsV2.Types.ApprenticeshipStatus.Live;

            var mapper = new ConfirmStopRequestToViewModelMapper(mockCommitmentsApiClient.Object);
            var result = await mapper.Map(request);

            Assert.AreEqual(2020, result.StopDate.Year);
            Assert.AreEqual(6, result.StopDate.Month);
        }