public AddNewOffersTestFixture(FlatOffersDbContextFixture dbFixture) { var connectionString = dbFixture.Context.Database.GetDbConnection().ConnectionString; var checkpoint = new Checkpoint(); Task.Run(() => checkpoint.Reset(connectionString)).Wait(); var Ad1 = AdvertisementFactory.GetAdverstisementType1(); var collector = new TestCollectorStub(); collector.Add(Ad1); var underTest = TrackOfferHandlerFactory.GetInstance(dbFixture.Context, collector); underTest.Execute(); }
public UpdateAndRemoveAtSameTimeTestFixture(FlatOffersDbContextFixture dbFixture) { var connectionString = dbFixture.Context.Database.GetDbConnection().ConnectionString; var checkpoint = new Checkpoint(); Task.Run(() => checkpoint.Reset(connectionString)).Wait(); var Offer = FlatOfferFactory.GetFlatOfferType1(); var Ad1 = AdvertisementFactory.GetAdverstisementType1(); var Ad2 = AdvertisementFactory.GetAdvertisementBasedOnOffer(Offer); Ad2.Price = UpdatedPrice; PopulateTables(dbFixture, Offer); var collector = new TestCollectorStub(); collector.Add(Ad1); collector.Add(Ad2); var underTest = TrackOfferHandlerFactory.GetInstance(dbFixture.Context, collector); underTest.Execute(); }