public void RemovesProp() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); comb.Props().Refined("name", "value", "value2"); comb.Props().Refined("name"); Assert.Empty( comb.Props().Names() ); }
public void HasArrayProps() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); comb.Props().Refined("name", "value", "value2"); Assert.Equal( new ManyOf("value", "value2"), comb.Props().Values("name") ); }
public void HasProps() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); comb.Props().Refined("name", "value"); Assert.Equal( "value", comb.Props().Value("name") ); }
public void DeliversXocument() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); using (var xoc = comb.Xocument("some.xml")) { Assert.Equal( 1, xoc.Nodes("/some").Count ); } }
public void XocumentRootSkipsSubDir() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); using (var xoc = comb.Xocument("sub/some.xml")) { Assert.Equal( 1, xoc.Nodes("/some").Count ); } }
public void IsCaseSensitive() { var comb = new RamComb("my-comb"); using (var cell = comb.Cell("this-is/MY-cell")) { cell.Update(new InputOf("its so cold outside")); } using (var cell = comb.Cell("this-is\\MY-cell")) { Assert.Equal( "its so cold outside", new TextOf(cell.Content()).AsString() ); } }
public void IsInsensitiveToSeparatorChars() { var comb = new RamComb("my-comb"); using (var cell = comb.Cell("this-is/my-cell")) { cell.Update(new InputOf("its so hot outside")); } using (var cell = comb.Cell("this-is\\my-cell")) { Assert.Equal( "its so hot outside", new TextOf(cell.Content()).AsString() ); } }
public void RemembersSubPathXocument() { var memory = new RamMnemonic(); var comb = new RamComb("my-comb", memory); 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 ); } }