Beispiel #1
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteIdTest_NotExists()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);
            int siteId   = instance.GetSiteId("dsdsd");

            Assert.AreEqual(0, siteId);
        }
Beispiel #2
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteIdTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);
            int id       = instance.GetSiteId(TestUtils.SiteName);

            Assert.AreEqual(35, id);
        }
Beispiel #3
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteIdWithEmptyParametersTest2()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetSiteId(string.Empty);
            }
            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.");
        }
Beispiel #4
0
        public void QPMetadataManagerGetSiteIdWithEmptyParametersTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetSiteId(string.Empty);
        }
Beispiel #5
0
        public void QPMetadataManagerGetSiteIdWithNullParametersTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetSiteId(null);
        }