public ProcessXMLFileHandlerTests() { memberUploadsDbSet = A.Fake <DbSet <MemberUpload> >(); producersDbSet = A.Fake <DbSet <ProducerSubmission> >(); xmlConverter = A.Fake <IXmlConverter>(); producerSubmissionDataAccess = A.Fake <IProducerSubmissionDataAccess>(); var schemes = new[] { FakeSchemeData() }; schemesDbSet = helper.GetAsyncEnabledDbSet(schemes); context = A.Fake <WeeeContext>(); A.CallTo(() => context.Schemes).Returns(schemesDbSet); A.CallTo(() => context.ProducerSubmissions).Returns(producersDbSet); A.CallTo(() => context.MemberUploads).Returns(memberUploadsDbSet); generator = A.Fake <IGenerateFromXml>(); xmlValidator = A.Fake <IXMLValidator>(); xmlChargeBandCalculator = A.Fake <IXMLChargeBandCalculator>(); totalChargeCalculator = A.Fake <ITotalChargeCalculator>(); totalChargeCalculatorDataAccess = A.Fake <ITotalChargeCalculatorDataAccess>(); handler = new ProcessXMLFileHandler(context, permissiveAuthorization, xmlValidator, generator, xmlConverter, xmlChargeBandCalculator, producerSubmissionDataAccess, totalChargeCalculator, totalChargeCalculatorDataAccess); }
public ProcessXMLFileHandler(WeeeContext context, IWeeeAuthorization authorization, IXMLValidator xmlValidator, IGenerateFromXml generateFromXml, IXmlConverter xmlConverter, IXMLChargeBandCalculator xmlChargeBandCalculator, IProducerSubmissionDataAccess producerSubmissionDataAccess, ITotalChargeCalculator totalChargeCalculator, ITotalChargeCalculatorDataAccess totalChargeCalculatorDataAccess) { this.context = context; this.authorization = authorization; this.xmlValidator = xmlValidator; this.xmlConverter = xmlConverter; this.xmlChargeBandCalculator = xmlChargeBandCalculator; this.generateFromXml = generateFromXml; this.producerSubmissionDataAccess = producerSubmissionDataAccess; this.totalChargeCalculator = totalChargeCalculator; this.totalChargeCalculatorDataAccess = totalChargeCalculatorDataAccess; }
public ProcessXMLFileHandlerTests() { memberUploadsDbSet = A.Fake<DbSet<MemberUpload>>(); producersDbSet = A.Fake<DbSet<ProducerSubmission>>(); xmlConverter = A.Fake<IXmlConverter>(); producerSubmissionDataAccess = A.Fake<IProducerSubmissionDataAccess>(); var schemes = new[] { FakeSchemeData() }; schemesDbSet = helper.GetAsyncEnabledDbSet(schemes); context = A.Fake<WeeeContext>(); A.CallTo(() => context.Schemes).Returns(schemesDbSet); A.CallTo(() => context.ProducerSubmissions).Returns(producersDbSet); A.CallTo(() => context.MemberUploads).Returns(memberUploadsDbSet); generator = A.Fake<IGenerateFromXml>(); xmlValidator = A.Fake<IXMLValidator>(); xmlChargeBandCalculator = A.Fake<IXMLChargeBandCalculator>(); handler = new ProcessXMLFileHandler(context, permissiveAuthorization, xmlValidator, generator, xmlConverter, xmlChargeBandCalculator, producerSubmissionDataAccess); }