コード例 #1
0
        public void CheckSetBrand()
        {
            ShopService ss = new ShopService();

            var product = ProductObjectMother.CreateProductWithNoPropertiesAndNoBrand();
            var brand   = ProductObjectMother.CreateBrandWithNameHoyt();

            ss.SetBrand(product, brand);

            Assert.AreEqual(product.Brand, brand);
        }
コード例 #2
0
        public void CheckSetBrandToProduct()
        {
            // Arrange
            var product = ProductObjectMother.CreateProductWithNoPropertiesAndNoBrand();
            var brand   = ProductObjectMother.CreateBrandWithNameHoyt(1);

            product.Brand = brand;


            // Assert
            Assert.IsTrue(product.Brand.Name == "Hoyt");
        }