Esempio n. 1
0
        public void CreateProductId()
        {
            // arrange
            const string expected = "productid";

            // act
            var productId = new ProductId(expected);

            // assert
            Assert.Equal(expected, productId.ToString());
        }
Esempio n. 2
0
 private Product(Guid id, ProductId productId, string name) : this()
 {
     HandleAggregateEvent(new ProductCreatedEvent(id, productId, name));
 }
Esempio n. 3
0
 public static Product CreateProduct(Guid id, ProductId productId, ProductName name)
 {
     return new Product(id, productId, name);
 }
Esempio n. 4
0
 public ProductCreatedEvent(Guid id, ProductId productId, string name) 
     : base(Guid.NewGuid(), id)
 {
     ProductId = productId;
     Name = name;
 }