Exemplo n.º 1
0
        public ElementCategory Post(ElementCategory value)
        {
            JavaScriptSerializer json_serializer = new JavaScriptSerializer();

            var feature = new CategoryCreateFeature();

            return(feature.Execute(value));
        }
        public void CategoryCreateFeatureShouldReturnTrueWhenValidInput()
        {
            var createFeature = new CategoryCreateFeature();

            ElementCategory elementCategory = new ElementCategory
            {
                Name        = "testCategory",
                Description = "test category"
            };

            var result = createFeature.Execute(elementCategory);

            Assert.IsTrue(result.Id > 0);
        }