public GetUkWeeeCsvDataAccess(WeeeContext context)
 {
     this.context = context;
 }
 public GetProducerDetailsDataAccess(WeeeContext context)
 {
     this.context = context;
 }
 public FetchOrganisationSearchResultsForCacheDataAccess(WeeeContext context)
 {
     this.context = context;
 }
 public TransactionReferenceGenerator(WeeeContext context)
 {
     this.context = context;
 }
 public FetchProducerSearchResultsForCacheDataAccess(WeeeContext context)
 {
     this.context = context;
 }
Exemplo n.º 6
0
 public DomainHelper(WeeeContext context)
 {
     this.context = context;
 }
 public ProducerChargeCalculatorDataAccess(WeeeContext context)
 {
     this.context = context;
     sumOfExistingChargesLookup = new Dictionary<string, Dictionary<SchemeProducerYear, decimal>>();
 }
 public GetSchemeObligationCsvDataProcessor(WeeeContext context)
 {
     this.context = context;
 }
 public GetSchemePublicInfoDataAccess(WeeeContext context)
 {
     this.context = context;
 }
 public OrganisationDetailsDataAccess(WeeeContext context)
 {
     this.context = context;
 }
Exemplo n.º 11
0
        public DatabaseWrapper()
        {
            // Create test user(context auditing requires a valid user id)
            var userId = string.Empty;
            using (var model = new Entities())
            {
                var testUserName = "******";
                var testUser = model.AspNetUsers.FirstOrDefault(u => u.UserName == testUserName);

                if (testUser == null)
                {
                    testUser = new AspNetUser
                    {
                        Id = Guid.NewGuid().ToString(),
                        FirstName = "Test",
                        Surname = "LastName",
                        Email = "[email protected]",
                        EmailConfirmed = true,
                        UserName = testUserName
                    };

                    model.AspNetUsers.Add(testUser);
                    model.SaveChanges();
                }

                userId = testUser.Id;
            }

            transactionScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);

            Model = new Entities();

            IUserContext userContext = A.Fake<IUserContext>();
            A.CallTo(() => userContext.UserId)
                .ReturnsLazily(() => Guid.Parse(userId));

            IEventDispatcher eventDispatcher = A.Fake<IEventDispatcher>();

            WeeeContext = new WeeeContext(userContext, eventDispatcher);

            StoredProcedures = new StoredProcedures(WeeeContext);
        }
 public DataReturnVersionGeneratorDataAccess(WeeeContext context)
 {
     this.context = context;
 }
 public GetMissingProducerDataCsvDataProcessor(WeeeContext context)
 {
     this.context = context;
 }
Exemplo n.º 14
0
 public WeeeTransactionAdapter(WeeeContext context)
 {
     this.context = context;
 }