Exemple #1
0
        public void ShouldPreventNoIndexForCategoryAttribute()
        {
            var q1 = "NOINDEX";

            _productCsv = ProductCsvBuilder.AProductCsv().WithQ1(q1).Build();

            var product = _productFactory.Create(_productCsv);

            Assert.Empty(product.Category);
        }
Exemple #2
0
        public void ShouldPreventNoIndexForDeliveredInAttribute()
        {
            var deliveredIn = "NOINDEX";

            _productCsv = ProductCsvBuilder.AProductCsv().WithDeliveredIn(deliveredIn).Build();

            var product = _productFactory.Create(_productCsv);

            Assert.Empty(product.DeliveredIn);
        }
Exemple #3
0
        public void ShouldPreventNoIndexForColorCodeAttribute()
        {
            var colorCode = "NOINDEX";

            _productCsv = ProductCsvBuilder.AProductCsv().WithColorCode(colorCode).Build();

            var product = _productFactory.Create(_productCsv);

            Assert.Empty(product.ColorCode);
        }
Exemple #4
0
        public void ShouldPreventNoIndexForKeyAttribute()
        {
            var key = "NOINDEX";

            _productCsv = ProductCsvBuilder.AProductCsv().WithKey(key).Build();

            var product = _productFactory.Create(_productCsv);

            Assert.Empty(product.Key);
        }
Exemple #5
0
        private void InitializeMocks()
        {
            _productCsv = ProductCsvBuilder.AProductCsv().Build();
            var productsCsv = new List <ProductCsv>()
            {
                _productCsv
            };

            _csvParser.Setup(x => x.Parse(_csv)).Returns(productsCsv);
            _product = ProductBuilder.AProduct().Build();

            _productFactory.Setup(x => x.Create(_productCsv)).Returns(_product);
        }
Exemple #6
0
        public ProductFactoryTest()
        {
            _productCsv = ProductCsvBuilder.AProductCsv().Build();

            _productFactory = new ProductFactory();
        }