コード例 #1
0
        public void TestAlreadyExists()
        {
            IProductUpdator productUpdator = MefBase.Resolve <IProductUpdator>();
            var             product        = JsonConvert.DeserializeObject <Product>("{Id: '1'}");

            productUpdator.Create(product);
        }
コード例 #2
0
        public void TestInvalidIdException4()
        {
            IProductUpdator productUpdator = MefBase.Resolve <IProductUpdator>();
            var             product        = JsonConvert.DeserializeObject <Product>("{Id: '" + Guid.Empty + "'}");

            productUpdator.Create(product);
        }
コード例 #3
0
        public void ProductValidation_Id()
        {
            IProductUpdator productUpdator = MefBase.Resolve <IProductUpdator>();
            Product         product        = JsonConvert.DeserializeObject <Product>("{ProductCategoryId: 1, Name: \"Tennis Shoes\"}");

            productUpdator.Create(product);
        }
コード例 #4
0
        public void TestNullException()
        {
            IProductUpdator productUpdator = MefBase.Resolve <IProductUpdator>();

            productUpdator.Create(null);
        }