public async Task HandleAsync_NoExternalAccess_ThrowsSecurityException() { var authorization = new AuthorizationBuilder().DenyExternalAreaAccess().Build(); var handler = new EditSentOnAatfSiteHandler(authorization, genericDataAccess, organisationDetailsDataAccess, offSiteDataAccess); Func <Task> action = async() => await handler.HandleAsync(A.Dummy <EditSentOnAatfSite>()); await action.Should().ThrowAsync <SecurityException>(); }
public EditSentOnAatfSiteHandlerTests() { var authorization = A.Fake <IWeeeAuthorization>(); offSiteDataAccess = A.Fake <IAatfSiteDataAccess>(); genericDataAccess = A.Fake <IGenericDataAccess>(); organisationDetailsDataAccess = A.Fake <IOrganisationDetailsDataAccess>(); handler = new EditSentOnAatfSiteHandler(authorization, genericDataAccess, organisationDetailsDataAccess, offSiteDataAccess); }