Esempio n. 1
0
 public void AddSectionTest(string path, int count, string expectedPath)
 {
     XmlDocumentCollection collection = new XmlDocumentCollection("CNS1", "RNS1");
     collection.AddSection(path, count);
     Assert.Multiple(() =>
     {
         Assert.IsNotNull(collection.RelationshipSections);
         Assert.AreEqual(collection.RelationshipSections.Count, 1);
         Assert.AreEqual(collection.RelationshipSections[0].Path, expectedPath);
     });
 }
Esempio n. 2
0
 public void AddSectionTest2(string path, int count, int expectedCount, string expectedPath)
 {
     XmlDocumentCollection collection = new XmlDocumentCollection("CNS1", "RNS1");
     string[] paths = TestUtils.SplitValues(path, '|');
     string[] expectedPaths = TestUtils.SplitValues(expectedPath, '|');
     for(int i = 0; i < paths.Length; i++)
     {
         collection.AddSection(paths[i], count);
     }
     Assert.Multiple(() =>
     {
         Assert.AreEqual(collection.RelationshipSections.Count, expectedCount);
         Assert.IsNotNull(collection.RelationshipSections);
         for (int i = 0; i < paths.Length; i++)
         {
             Assert.AreEqual(collection.RelationshipSections[i].Path, expectedPaths[i]);
         } 
     });
 }