Ejemplo n.º 1
0
        public GetSentOnAatfSiteHandlerTests()
        {
            authorization = A.Fake<IWeeeAuthorization>();
            sentOnDataAccess = A.Fake<IWeeeSentOnDataAccess>();
            mapper = A.Fake<IMap<AatfAddress, AatfAddressData>>();

            handler = new GetSentOnAatfSiteHandler(authorization, sentOnDataAccess, mapper);
        }
Ejemplo n.º 2
0
        public async Task HandleAsync_NoExternalAccess_ThrowsSecurityException()
        {
            var authorization = new AuthorizationBuilder().DenyExternalAreaAccess().Build();

            var handler = new GetSentOnAatfSiteHandler(authorization, sentOnDataAccess, mapper);

            Func<Task> action = async () => await handler.HandleAsync(A.Dummy<GetSentOnAatfSite>());

            await action.Should().ThrowAsync<SecurityException>();
        }