Ejemplo 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));
        }
Ejemplo 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);
            }
Ejemplo n.º 3
0
            public async Task <GetApprenticeshipUpdateQueryResult> Handle()
            {
                _result = await _handler.Handle(_request, new CancellationToken());

                return(_result);
            }