示例#1
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentAttributeTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);
            var attr     = instance.GetContentAttribute(TestUtils.SiteName, "AbstractItem", "Name");

            Assert.IsNotNull(attr);
            Assert.AreEqual("Name", attr.Name);
            Assert.AreEqual(293, attr.ContentId);

            attr = instance.GetContentAttribute(TestUtils.SiteName, "AbstractItem", "Name1");
            Assert.IsNull(attr);
        }
示例#2
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentAttributeWithEmptyParametersTest9()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetContentAttribute(TestUtils.SiteName, "AbstractItem", string.Empty);
            }
            catch (ArgumentNullException ex)
            {
                Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
                Assert.AreEqual("Value cannot be null.\r\nParameter name: fieldName", ex.Message);

                return;
            }

            Assert.Fail("The exception was not thrown.");
        }
示例#3
0
        public void QPMetadataManagerGetContentAttributeWithEmptyParametersTest6()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentAttribute(null, "AbstractItem", string.Empty);
        }
示例#4
0
        public void QPMetadataManagerGetContentAttributeWithEmptyParametersTest5()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentAttribute(string.Empty, string.Empty, "Name");
        }
示例#5
0
        public void QPMetadataManagerGetContentAttributeWithNullParametersTest5()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentAttribute(null, null, "Name");
        }
示例#6
0
        public void QPMetadataManagerGetContentAttributeWithNullParametersTest3()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentAttribute(TestUtils.SiteName, "AbstractItem", null);
        }