Exemplo n.º 1
0
        public static TractOffersHandler GetInstance(FlatOffersDbContext context, IAdvertisementsCollector collector)
        {
            var repo = new FlatOffersRepository(context);

            return(new TractOffersHandler(repo,
                                          new UpdateOffersBasedOnAdvertisementsHandler(new GetImageByUrlStub()),
                                          new List <IAdvertisementsCollector> {
                collector
            },
                                          Log.Logger));
        }
Exemplo n.º 2
0
        public AdvertisementTrackingJobTest(FlatOffersDbContextFixture dbFixture)
        {
            var connectionString = dbFixture.Context.Database.GetDbConnection().ConnectionString;
            var checkpoint       = new Checkpoint();

            Task.Run(() => checkpoint.Reset(connectionString)).Wait();

            Context = dbFixture.Context;
            MockedFlatOfferExecution = new Mock <ICommand>();
            UnderTest = new AdvertisementTrackingJob(MockedFlatOfferExecution.Object, Log.Logger, new ExecutionHistoryRepository(Context));
        }
 public AddNewOffersTest(FlatOffersDbContextFixture dbFixture)
 {
     _context = dbFixture.Context;
 }
 public FlatOffersRepository(FlatOffersDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public RemoveAndAddAtSameTimeTest(FlatOffersDbContextFixture dbFixture)
 {
     _context = dbFixture.Context;
 }
 public UpdateAndRemoveAtSameTimeTest(FlatOffersDbContextFixture dbFixture)
 {
     _context = dbFixture.Context;
 }
 public ExecutionHistoryRepository(FlatOffersDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Exemplo n.º 8
0
 public NotificationRepository(FlatOffersDbContext dbContext)
 {
     _dbContext = dbContext;
 }