// [TestMethod] public void QPMetadataManagerGetSiteNameTest() { var instance = new QPMetadataManager(TestUtils.ConnectionString); string name = instance.GetSiteName(35); Assert.AreEqual(TestUtils.SiteName, name); }
// [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."); }
// [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."); }
public void QPMetadataManagerGetSiteNameTest_NotExists() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetSiteName(350); }
public void QPMetadataManagerGetSiteNameWithNullParametersTest() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetSiteName(0); }