//[TestMethod] public void QPMetadataManagerGetContentAttributesByIdTest() { var instance = new QPMetadataManager(TestUtils.ConnectionString); var attrs = instance.GetContentAttributes(293); Assert.IsNotNull(attrs); Assert.AreEqual(18, attrs.Count); foreach (var item in attrs) { if (item.ContentId != 293) { Assert.Fail("ContentId is incorrect."); } } attrs = instance.GetContentAttributes(int.MaxValue); Assert.IsNotNull(attrs); Assert.AreEqual(0, attrs.Count); }
// [TestMethod] public void QPMetadataManagerGetContentAttributesByIdWithNullParametersTest2() { try { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetContentAttributes(0); } catch (ArgumentNullException ex) { Assert.IsInstanceOfType(ex, typeof(ArgumentNullException)); Assert.AreEqual("Value cannot be null.\r\nParameter name: contentId", ex.Message); return; } Assert.Fail("The exception was not thrown."); }
public void QPMetadataManagerGetContentAttributesByIdWithNullParametersTest() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetContentAttributes(0); }
public void QPMetadataManagerGetContentAttributesNotExistsTest() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetContentAttributes(TestUtils.SiteName, "AbstractItem1"); }
public void QPMetadataManagerGetContentAttributesWithEmptyParametersTest3() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetContentAttributes(string.Empty, "AbstractItem"); }
public void QPMetadataManagerGetContentAttributesWithEmptyParametersTest2() { var instance = new QPMetadataManager(TestUtils.ConnectionString); instance.GetContentAttributes(TestUtils.SiteName, string.Empty); }