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)); }
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; }
public NotificationRepository(FlatOffersDbContext dbContext) { _dbContext = dbContext; }