コード例 #1
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteNameTest()
        {
            var    instance = new QPMetadataManager(TestUtils.ConnectionString);
            string name     = instance.GetSiteName(35);

            Assert.AreEqual(TestUtils.SiteName, name);
        }
コード例 #2
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteNameTest_NotExists_CheckExceptionText()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetSiteName(350);
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOfType(ex, typeof(Exception));
                Assert.AreEqual("Site (id = 350) is not found", ex.Message);

                return;
            }

            Assert.Fail("The exception was not thrown.");
        }
コード例 #3
0
        //  [TestMethod]
        public void QPMetadataManagerGetSiteNameWithNullParametersTest2()
        {
            try
            {
                var instance = new QPMetadataManager(TestUtils.ConnectionString);
                instance.GetSiteName(0);
            }
            catch (ArgumentNullException ex)
            {
                Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
                Assert.AreEqual("Value cannot be null.\r\nParameter name: siteId", ex.Message);

                return;
            }

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

            instance.GetSiteName(350);
        }
コード例 #5
0
        public void QPMetadataManagerGetSiteNameWithNullParametersTest()
        {
            var instance = new QPMetadataManager(TestUtils.ConnectionString);

            instance.GetSiteName(0);
        }