コード例 #1
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentIdTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);
            int id       = instance.GetContentId(TestUtils.SiteName, "AbstractItem");

            Assert.AreEqual(293, id);
        }
コード例 #2
0
        //  [TestMethod]
        public void QPMetadataManagerGetContentIdWithEmptyParametersTest6()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetContentId(string.Empty, "AbstractItem");
            }
            catch (ArgumentNullException ex)
            {
                Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
                Assert.AreEqual("Value cannot be null.\r\nParameter name: siteName", ex.Message);

                return;
            }

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

            instance.GetContentId(null, "AbstractItem");
        }
コード例 #4
0
        public void QPMetadataManagerGetContentIdWithNullParametersTest2()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentId(TestUtils.SiteName, null);
        }
コード例 #5
0
        public void QPMetadataManagerGetContentIdWithEmptyParametersTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetContentId(string.Empty, string.Empty);
        }