コード例 #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);
        }