public void Has_Title() { string title = "My Product"; var product = new ProductBuilder().WithTitle(title).GetResult(); Assert.Equal(product.Title, title); }
public void Has_Id() { string id = "346598635dfh"; var product = new ProductBuilder().WithId(id).GetResult(); Assert.Equal(product.Id, id); }
public void Has_Summary() { AggregateFactory.Configure(); string summary = "My summary"; var product = new ProductBuilder().WithSummary(summary).AsAggregate<ProductSummaryAggregate>(new AggregateFactory()); Assert.Equal(product.Summary, summary); }
public void Has_Description() { AggregateFactory.Configure(); string desc = "My description"; var product = new ProductBuilder().WithDescription(desc).AsAggregate<ProductDetailsAggregate>(new AggregateFactory()); Assert.Equal(product.Description, desc); }
public void Has_Categories() { AggregateFactory.Configure(); var product = new ProductBuilder() .WithCategories( new Category(), new Category() ) .AsAggregate<ProductDetailsAggregate>(new AggregateFactory()); Assert.Equal(product.Categories.Count(), 2); }
public void Has_Variants() { AggregateFactory.Configure(); var product = new ProductBuilder() .WithVariants( new Product(), new Product() ) .AsAggregate<ProductVariantsAggregate>(new AggregateFactory()); Assert.Equal(product.Variants.Count(), 2); }