public void SetUp() { user = new User(); auctionArgs = new AuctionArgs.Builder() .SetBuyNow(12) .SetStartDate(DateTime.UtcNow.AddMinutes(20)) .SetEndDate(DateTime.UtcNow.AddDays(1)) .SetProduct(new Product("test name", "desccription 1111", Condition.New)) .SetCategory(new Category("", 0)) .SetOwner(new UserIdentity()) .SetTags(new[] { "tag1" }) .SetName("Test name") .Build(); }
public Auction CreateAuction(AuctionArgs auctionArgs) { CheckIsSessionValid(); if (Creator == null) { throw new DomainException("User must be registered to create auction"); } var args = new AuctionArgs.Builder() .From(auctionArgs) .SetImages(SessionAuctionImages) .SetOwner(Creator) .Build(); var auction = new Auction(args); return(auction); }
public AuctionCreated(Guid auctionId, AuctionArgs auctionArgs) : base(EventNames.AuctionCreated) { AuctionId = auctionId; AuctionArgs = auctionArgs; }