コード例 #1
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        public void Has_Title()
        {
            string title = "My Product";
            var product = new ProductBuilder().WithTitle(title).GetResult();

            Assert.Equal(product.Title, title);
        }
コード例 #2
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        public void Has_Id()
        {
            string id = "346598635dfh";
            var product = new ProductBuilder().WithId(id).GetResult();

            Assert.Equal(product.Id, id);
        }
コード例 #3
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        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);
        }
コード例 #4
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        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);
        }
コード例 #5
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        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);
        }
コード例 #6
0
ファイル: ProductTests.cs プロジェクト: KodrAus/cirrus
        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);
        }