コード例 #1
0
 public void RemovesProp()
 {
     using (var temp = new TempDirectory())
     {
         var memory = new FileMnemonic(temp.Value().FullName);
         var comb   = new FileComb("my-comb", memory);
         comb.Props().Refined("name", "value", "value2");
         comb.Props().Refined("name");
         Assert.Empty(
             comb.Props().Names()
             );
     }
 }
コード例 #2
0
 public void HasArrayProps()
 {
     using (var temp = new TempDirectory())
     {
         var memory = new FileMnemonic(temp.Value().FullName);
         var comb   = new FileComb("my-comb", memory);
         comb.Props().Refined("name", "value", "value2");
         Assert.Equal(
             new ManyOf("value", "value2"),
             comb.Props().Values("name")
             );
     }
 }
コード例 #3
0
 public void XocumentRootSkipsSubDir()
 {
     using (var temp = new TempDirectory())
     {
         var comb = new FileComb(temp.Value().FullName, "my-comb");
         using (var xoc = comb.Xocument("sub/some.xml"))
         {
             Assert.Equal(
                 1,
                 xoc.Nodes("/some").Count
                 );
         }
     }
 }
コード例 #4
0
 public void RemembersSubPathXocument()
 {
     using (var temp = new TempDirectory())
     {
         var comb = new FileComb(temp.Value().FullName, "my-comb");
         using (var xoc = comb.Xocument("sub/dir/some.xml"))
         {
             xoc.Modify(new Directives().Xpath("/some").Add("test"));
         }
         using (var xoc = comb.Xocument("sub/dir/some.xml"))
         {
             Assert.Equal(
                 1,
                 xoc.Nodes("/some/test").Count
                 );
         }
     }
 }