Beispiel #1
0
        public void CreateProductId()
        {
            // arrange
            const string expected = "productid";

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

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