public void CreatesBlockInRoot() { var media = new YamlMedia(); media.Block("root") .Prop("key") .Put("value"); Assert.Contains( "value", media.Content() ); }
public void BuildsBlockInBlock() { var media = new YamlMedia(); media.Block("root") .Block("contents"); Assert.Equal( "root:\r\n contents:\r\n", media.Content(), false, true, false ); }
public void CreatesBlockInProp() { var media = new YamlMedia(); media.Block("root") .Prop("my-block") .Block("contents"); Assert.Equal( "root:\r\n my-block: contents:\r\n", media.Content(), false, true, false ); }
public void CreatesPropertyInBlock() { var media = new YamlMedia(); media.Block("root") .Prop("key") .Put("lock"); Assert.Equal( "root:\r\n key: lock\r\n", media.Content().ToString(), false, true, false ); }
public void CreatesArrayInBlock() { var media = new YamlMedia(); media .Block("root") .Array("keys", "key"); Assert.Equal( "root:\r\n keys:\r\n", media.Content(), false, true, false ); }