예제 #1
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentNameTest_NotExists()
        {
            var    instance = new QPMetadataManager(TestUtils.ConnectionString);
            string name     = instance.GetContentName(1);

            Assert.AreEqual("", name);
        }
예제 #2
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentNameTest()
        {
            var    instance = new QPMetadataManager(TestUtils.ConnectionString);
            string name     = instance.GetContentName(295);

            Assert.AreEqual("Culture", name);
        }
예제 #3
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentNameWithNullParametersTest2()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetContentName(0);
            }
            catch (ArgumentNullException ex)
            {
                Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
                Assert.AreEqual("Value cannot be null.\r\nParameter name: contentId", ex.Message);

                return;
            }

            Assert.Fail("The exception was not thrown.");
        }
예제 #4
0
        public void QPMetadataManagerGetContentNameWithNullParametersTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentName(0);
        }