Ejemplo n.º 1
0
        public GetReportOnQuestionHandlerTests()
        {
            dataAccess    = A.Fake <IGenericDataAccess>();
            authorization = A.Fake <IWeeeAuthorization>();

            handler = new GetReportOnQuestionHandler(authorization, dataAccess);
        }
Ejemplo n.º 2
0
        public GetPopulatedReturnTests()
        {
            returnDataAccess                = A.Fake <IReturnDataAccess>();
            mapper                          = A.Fake <IMap <ReturnQuarterWindow, ReturnData> >();
            quarterWindowFactory            = A.Fake <IQuarterWindowFactory>();
            fetchNonObligatedWeeeDataAccess = A.Fake <INonObligatedDataAccess>();
            fetchObligatedWeeeDataAccess    = A.Fake <IFetchObligatedWeeeForReturnDataAccess>();
            fetchAatfDataAccess             = A.Fake <IFetchAatfDataAccess>();
            returnSchemeDataAccess          = A.Fake <IReturnSchemeDataAccess>();
            genericDataAccess               = A.Fake <IGenericDataAccess>();
            systemDataDataAccess            = A.Fake <ISystemDataDataAccess>();

            populatedReturn = new GetPopulatedReturn(new AuthorizationBuilder()
                                                     .AllowExternalAreaAccess()
                                                     .AllowOrganisationAccess().Build(),
                                                     returnDataAccess,
                                                     mapper,
                                                     quarterWindowFactory,
                                                     fetchNonObligatedWeeeDataAccess,
                                                     fetchObligatedWeeeDataAccess,
                                                     fetchAatfDataAccess,
                                                     returnSchemeDataAccess,
                                                     genericDataAccess,
                                                     systemDataDataAccess);
        }
Ejemplo n.º 3
0
 public GetAatfInfoByOrganisationRequestHandlerTests()
 {
     mapper        = A.Fake <IMap <Aatf, AatfData> >();
     dataAccess    = A.Fake <IGenericDataAccess>();
     authorization = A.Fake <IWeeeAuthorization>();
     handler       = new GetAatfInfoByOrganisationRequestHandler(mapper, dataAccess, authorization);
 }
Ejemplo n.º 4
0
 public EditSentOnAatfSiteHandler(IWeeeAuthorization authorization, IGenericDataAccess genericDataAccess, IOrganisationDetailsDataAccess orgDataAccess, IAatfSiteDataAccess offSiteDataAccess)
 {
     this.authorization                 = authorization;
     this.genericDataAccess             = genericDataAccess;
     this.organisationDetailsDataAccess = orgDataAccess;
     this.offSiteDataAccess             = offSiteDataAccess;
 }
Ejemplo n.º 5
0
 public AatfSiteDataAccessTests()
 {
     context           = A.Fake <WeeeContext>();
     genericDataAccess = A.Fake <IGenericDataAccess>();
     dataAccess        = new AatfSiteDataAccess(context, genericDataAccess);
     dbContextHelper   = new DbContextHelper();
     aatfId            = A.Dummy <Guid>();
 }
Ejemplo n.º 6
0
 public AatfDataAccess(WeeeContext context,
                       IGenericDataAccess genericDataAccess,
                       IQuarterWindowFactory quarterWindowFactory)
 {
     this.context              = context;
     this.genericDataAccess    = genericDataAccess;
     this.quarterWindowFactory = quarterWindowFactory;
 }
Ejemplo n.º 7
0
        public RemoveAatfSiteHandlerTests()
        {
            this.context           = A.Fake <WeeeContext>();
            this.authorization     = A.Fake <IWeeeAuthorization>();
            this.genericDataAccess = A.Fake <IGenericDataAccess>();

            handler = new RemoveAatfSiteHandler(context, authorization, genericDataAccess);
        }
Ejemplo n.º 8
0
 public RemoveWeeeSentOnHandler(WeeeContext context, IWeeeAuthorization authorization, IWeeeSentOnDataAccess sentOnDataAccess, IGenericDataAccess genericDataAccess, IFetchObligatedWeeeForReturnDataAccess obligatedWeeeDataAccess)
 {
     this.context                 = context;
     this.authorization           = authorization;
     this.sentOnDataAccess        = sentOnDataAccess;
     this.genericDataAccess       = genericDataAccess;
     this.obligatedWeeeDataAccess = obligatedWeeeDataAccess;
 }
Ejemplo n.º 9
0
 public AddReturnReportOnHandler(IWeeeAuthorization authorization,
                                 IGenericDataAccess dataAccess,
                                 WeeeContext context)
 {
     this.authorization = authorization;
     this.dataAccess    = dataAccess;
     this.context       = context;
 }
Ejemplo n.º 10
0
 public AddObligatedSentOnHandler(IWeeeAuthorization authorization,
                                  IObligatedSentOnDataAccess obligatedSentOnDataAccess,
                                  IGenericDataAccess genericDataAccess)
 {
     this.authorization             = authorization;
     this.obligatedSentOnDataAccess = obligatedSentOnDataAccess;
     this.genericDataAccess         = genericDataAccess;
 }
        public EditObligatedSentOnHandlerTests()
        {
            authorization             = A.Fake <IWeeeAuthorization>();
            genericDataAccess         = A.Fake <IGenericDataAccess>();
            obligatedSentOnDataAccess = A.Fake <IObligatedSentOnDataAccess>();

            handler = new EditObligatedSentOnHandler(authorization, obligatedSentOnDataAccess, genericDataAccess);
        }
Ejemplo n.º 12
0
 public EditObligatedReceivedHandler(IWeeeAuthorization authorization,
                                     IObligatedReceivedDataAccess obligatedReceivedDataAccess,
                                     IGenericDataAccess genericDataAccess)
 {
     this.authorization               = authorization;
     this.genericDataAccess           = genericDataAccess;
     this.obligatedReceivedDataAccess = obligatedReceivedDataAccess;
 }
Ejemplo n.º 13
0
 public AddSentOnAatfSiteHandler(IWeeeAuthorization authorization,
                                 IWeeeSentOnDataAccess sentOnDataAccess, IGenericDataAccess genericDataAccess, IReturnDataAccess returnDataAccess, IOrganisationDetailsDataAccess orgDataAccess)
 {
     this.authorization                 = authorization;
     this.sentOnDataAccess              = sentOnDataAccess;
     this.genericDataAccess             = genericDataAccess;
     this.returnDataAccess              = returnDataAccess;
     this.organisationDetailsDataAccess = orgDataAccess;
 }
        public GetPreviousQuarterSchemesHandlerTests()
        {
            var weeeAuthorization = A.Fake <IWeeeAuthorization>();

            dataAccess = A.Fake <IGenericDataAccess>();
            handler    = new GetPreviousQuarterSchemesHandler(weeeAuthorization, dataAccess);

            fixture = new Fixture();
        }
Ejemplo n.º 15
0
        public AddAatfRequestHandlerTests()
        {
            addressMapper    = A.Fake <IMap <AatfAddressData, AatfAddress> >();
            contactMapper    = A.Fake <IMap <AatfContactData, AatfContact> >();
            dataAccess       = A.Fake <IGenericDataAccess>();
            commonDataAccess = A.Fake <ICommonDataAccess>();

            handler = new AddAatfRequestHandler(AuthorizationBuilder.CreateUserWithAllRights(), dataAccess, addressMapper, contactMapper, commonDataAccess);
        }
        public EditNonObligatedHandlerTests()
        {
            var authorization = A.Fake <IWeeeAuthorization>();

            this.nonObligatedDataAccess = A.Fake <INonObligatedDataAccess>();
            this.genericDataAccess      = A.Fake <IGenericDataAccess>();

            handler = new EditNonObligatedHandler(authorization, nonObligatedDataAccess, genericDataAccess);
        }
Ejemplo n.º 17
0
        public GetAddressHandlerTests()
        {
            authorization = AuthorizationBuilder.CreateUserAllowedToAccessOrganisation();

            dataAccess = A.Fake <IGenericDataAccess>();
            mapper     = A.Fake <IMap <Address, AddressData> >();

            handler = new GetAddressHandler(authorization, dataAccess, mapper);
        }
Ejemplo n.º 18
0
        public EditAatfContactHandlerTests()
        {
            this.aatfDataAccess                = A.Fake <IAatfDataAccess>();
            this.genericDataAccess             = A.Fake <IGenericDataAccess>();
            this.organisationDetailsDataAccess = A.Fake <IOrganisationDetailsDataAccess>();
            fixture = new Fixture();

            this.handler = new EditAatfContactHandler(new AuthorizationBuilder().AllowEverything().Build(), this.aatfDataAccess, this.genericDataAccess, this.organisationDetailsDataAccess);
        }
Ejemplo n.º 19
0
        public EditObligatedReceivedHandlerTests()
        {
            var authorization = A.Fake <IWeeeAuthorization>();

            addObligatedReceivedDataAccess = A.Dummy <IObligatedReceivedDataAccess>();
            genericDataAccess = A.Fake <IGenericDataAccess>();

            handler = new EditObligatedReceivedHandler(authorization, addObligatedReceivedDataAccess, genericDataAccess);
        }
        public AddReturnReportOnHandlerTests()
        {
            var weeeAuthorization = A.Fake <IWeeeAuthorization>();

            context    = A.Fake <WeeeContext>();
            dataAccess = A.Fake <IGenericDataAccess>();
            fixture    = new Fixture();

            handler = new AddReturnReportOnHandler(weeeAuthorization, dataAccess, context);
        }
Ejemplo n.º 21
0
        public AatfDataAccessTests()
        {
            fixture              = new Fixture();
            context              = A.Fake <WeeeContext>();
            dbContextHelper      = new DbContextHelper();
            genericDataAccess    = A.Fake <IGenericDataAccess>();
            quarterWindowFactory = A.Fake <IQuarterWindowFactory>();

            dataAccess = new AatfDataAccess(context, genericDataAccess, quarterWindowFactory);
        }
 public GetReturnNonObligatedCsvHandler(IWeeeAuthorization authorization,
                                        WeeeContext weeContext,
                                        IGenericDataAccess dataAccess,
                                        CsvWriterFactory csvWriterFactory)
 {
     this.authorization    = authorization;
     this.weeContext       = weeContext;
     this.dataAccess       = dataAccess;
     this.csvWriterFactory = csvWriterFactory;
 }
        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);
        }
Ejemplo n.º 24
0
 public EditAatfContactHandler(IWeeeAuthorization authorization,
                               IAatfDataAccess aatfDataAccess,
                               IGenericDataAccess genericDataAccess,
                               IOrganisationDetailsDataAccess organisationDetailsDataAccess)
 {
     this.authorization                 = authorization;
     this.aatfDataAccess                = aatfDataAccess;
     this.genericDataAccess             = genericDataAccess;
     this.organisationDetailsDataAccess = organisationDetailsDataAccess;
 }
Ejemplo n.º 25
0
 public EditSentOnAatfSiteWithOperatorHandler(WeeeContext context, IWeeeAuthorization authorization,
                                              IWeeeSentOnDataAccess sentOnDataAccess, IGenericDataAccess genericDataAccess, IReturnDataAccess returnDataAccess, IOrganisationDetailsDataAccess orgDataAccess)
 {
     this.context                       = context;
     this.authorization                 = authorization;
     this.sentOnDataAccess              = sentOnDataAccess;
     this.genericDataAccess             = genericDataAccess;
     this.returnDataAccess              = returnDataAccess;
     this.organisationDetailsDataAccess = orgDataAccess;
 }
Ejemplo n.º 26
0
 public AddAatfSiteHandler(WeeeContext context, IWeeeAuthorization authorization,
                           IAatfSiteDataAccess offSiteDataAccess, IGenericDataAccess genericDataAccess,
                           IOrganisationDetailsDataAccess organisationDetailsDataAccess)
 {
     this.context                       = context;
     this.authorization                 = authorization;
     this.offSiteDataAccess             = offSiteDataAccess;
     this.genericDataAccess             = genericDataAccess;
     this.organisationDetailsDataAccess = organisationDetailsDataAccess;
 }
Ejemplo n.º 27
0
        public EditAatfSiteHandlerTests()
        {
            authorisation                 = A.Fake <IWeeeAuthorization>();
            aatfSiteDataAccess            = A.Fake <IAatfSiteDataAccess>();
            genericDataAccess             = A.Fake <IGenericDataAccess>();
            organisationDetailsDataAccess = A.Fake <IOrganisationDetailsDataAccess>();
            weeeContext = A.Fake <WeeeContext>();

            handler = new EditAatfSiteHandler(weeeContext, authorisation, aatfSiteDataAccess, genericDataAccess, organisationDetailsDataAccess);
        }
Ejemplo n.º 28
0
        public RemoveWeeeSentOnHandlerTests()
        {
            this.context                 = A.Fake <WeeeContext>();
            this.authorization           = A.Fake <IWeeeAuthorization>();
            this.sentOnDataAccess        = A.Fake <IWeeeSentOnDataAccess>();
            this.genericDataAccess       = A.Fake <IGenericDataAccess>();
            this.obligatedWeeeDataAccess = A.Fake <IFetchObligatedWeeeForReturnDataAccess>();

            handler = new RemoveWeeeSentOnHandler(context, authorization, sentOnDataAccess, genericDataAccess, obligatedWeeeDataAccess);
        }
        public AddSentOnAatfSiteHandlerTests()
        {
            returnDataAccess = A.Fake <IReturnDataAccess>();
            var authorization = A.Fake <IWeeeAuthorization>();

            sentOnDataAccess              = A.Fake <IWeeeSentOnDataAccess>();
            genericDataAccess             = A.Fake <IGenericDataAccess>();
            organisationDetailsDataAccess = A.Fake <IOrganisationDetailsDataAccess>();

            handler = new AddSentOnAatfSiteHandler(authorization, sentOnDataAccess, genericDataAccess, returnDataAccess, organisationDetailsDataAccess);
        }
Ejemplo n.º 30
0
        public AddAatfSiteHandlerTests()
        {
            authorisation                 = A.Fake <IWeeeAuthorization>();
            addAatfSiteDataAccess         = A.Fake <IAatfSiteDataAccess>();
            genericDataAccess             = A.Fake <IGenericDataAccess>();
            obligatedReusedDataAccess     = A.Fake <IObligatedReusedDataAccess>();
            organisationDetailsDataAccess = A.Fake <IOrganisationDetailsDataAccess>();
            weeeContext = A.Fake <WeeeContext>();

            handler = new AddAatfSiteHandler(weeeContext, authorisation, addAatfSiteDataAccess, genericDataAccess, organisationDetailsDataAccess);
        }