Esempio n. 1
0
        public async Task Arrange()
        {
            var autoFixture = new Fixture();

            autoFixture.Customizations.Add(new ApprenticeshipUpdateOriginatorSpecimenBuilder());
            _source = autoFixture.Create <GetApprenticeshipUpdateQueryResult>();
            _result = await _mapper.Map(TestHelper.Clone(_source));
        }
Esempio n. 2
0
            public GetApprenticeshipUpdatesTestsFixture WithNoPendingUpdateFound()
            {
                QueryResult = new GetApprenticeshipUpdateQueryResult {
                    ApprenticeshipUpdates = new List <GetApprenticeshipUpdateQueryResult.ApprenticeshipUpdate>()
                };
                Mediator.Setup(x => x.Send(It.IsAny <GetApprenticeshipUpdateQuery>(), It.IsAny <CancellationToken>()))
                .ReturnsAsync(QueryResult);

                MapperResult = new GetApprenticeshipUpdatesResponse {
                    ApprenticeshipUpdates = new List <GetApprenticeshipUpdatesResponse.ApprenticeshipUpdate>()
                };
                ModelMapper.Setup(x => x.Map <GetApprenticeshipUpdatesResponse>(It.Is <GetApprenticeshipUpdateQueryResult>(r => r == QueryResult)))
                .ReturnsAsync(MapperResult);

                return(this);
            }
Esempio n. 3
0
            public async Task <GetApprenticeshipUpdateQueryResult> Handle()
            {
                _result = await _handler.Handle(_request, new CancellationToken());

                return(_result);
            }