Exemplo n.º 1
0
        public void Value_gets_trimmed(string value, string excpected)
        {
            var name = new AuctionName(value);

            name.Value.Should()
            .Be(excpected);
        }
Exemplo n.º 2
0
 public CreateAuctionCommand(BuyNowPrice buyNowPrice, Product product,
                             AuctionDate startDate, AuctionDate endDate, List <string> category,
                             Tag[] tags, AuctionName name, bool?buyNowOnly)
 {
     BuyNowPrice = buyNowPrice;
     Product     = product;
     StartDate   = startDate;
     EndDate     = endDate;
     Category    = category;
     Tags        = tags;
     Name        = name;
     BuyNowOnly  = buyNowOnly;
 }
Exemplo n.º 3
0
 public UpdateAuctionCommand(Guid auctionId,
                             BuyNowPrice buyNowPrice, AuctionDate endDate,
                             List <string> category, string description,
                             Tag[] tags, AuctionName name)
 {
     if (auctionId.Equals(Guid.Empty))
     {
         throw new InvalidCommandException($"Invalid field AuctionId = {auctionId}");
     }
     AuctionId   = auctionId;
     BuyNowPrice = buyNowPrice;
     EndDate     = endDate;
     Category    = category;
     Description = description;
     Tags        = tags;
     Name        = name;
 }
Exemplo n.º 4
0
 public AuctionNameChanged(Guid auctionId, AuctionName auctionName) : base(EventNames.AuctionNameChanged)
 {
     AuctionId   = auctionId;
     AuctionName = auctionName;
 }