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

            Assert.AreEqual(293, id);
        }
Exemple #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.");
        }
Exemple #3
0
        public void QPMetadataManagerGetContentIdWithNullParametersTest3()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

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

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

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