public void Setup() { this.anotherBid = new Bid { Id = 1, Amount = 10, Date = DateTime.Now.AddDays(-1) }; this.bid = new Bid { Id = 2, Amount = 10.5f, Date = DateTime.Now, Product = new Product { StartDate = DateTime.Now.AddDays(1), EndDate = DateTime.Now.AddDays(10), Name = "Valid Name for Product", Currency = new Currency { Name = "ValidCurrency", Abbreviation = "VC" }, Price = 10, Description = "This is a valid despription of a valid product because it has a valid lenght.", Bid = new List <Bid> { this.anotherBid } } }; this.bidRepository = A.Fake <IRepositoryBid>(); this.bidService = new BidServices(this.bidRepository); }
/// <summary> /// Initializes a new instance of the <see cref="BidServices" /> class. /// </summary> /// <param name="repository">The repository.</param> public BidServices(IRepositoryBid repository) { this.repository = repository; }