public void SetUp() { this.libraryContextMock = EntityFrameworkMock.Create <LibraryDbContext>(); EntityFrameworkMock.PrepareMock(this.libraryContextMock); this.userReviewService = new UserReviewService(new UserReviewRepository(this.libraryContextMock)); this.auctionUserService = new AuctionUserService(new AuctionUserRepository(this.libraryContextMock), this.userReviewService); }
public void SetUp() { this.libraryContextMock = EntityFrameworkMock.Create <LibraryDbContext>().PrepareMock(); this.productService = new ProductService(new ProductRepository(this.libraryContextMock)); this.priceService = new PriceService(new PriceRepository(this.libraryContextMock)); this.userReviewService = new UserReviewService(new UserReviewRepository(this.libraryContextMock)); this.auctionUserService = new AuctionUserService(new AuctionUserRepository(this.libraryContextMock), this.userReviewService); this.categoryService = new CategoryService(new CategoryRepository(this.libraryContextMock)); this.auctionService = new AuctionService(new AuctionRepository(this.libraryContextMock), this.categoryService, this.auctionUserService); this.bidService = new BidService(new BidRepository(this.libraryContextMock), this.auctionService); }