public void PreservesCase() { var mem = new RamContents(); mem.Xml(@"BIG\subdir/file", () => new XDocument(new XElement("root", new XElement("years", new XText("1980's"))))); Assert.Equal( "BIG/subdir/file", new FirstOf <string>(mem.Knowledge("")).Value() ); }
public void NormalizesSlashes() { var mem = new RamContents(); mem.Xml(@"childhood\subdir/file", () => new XDocument(new XElement("root", new XElement("years", new XText("1980's"))))); Assert.Equal( @"childhood/subdir/file", new FirstOf <string>(mem.Knowledge("")).Value() ); }
public void UpdatesKnowledge() { var mem = new RamContents( new KeyValuePair <string, byte[]>(@"a/b/c.dat", new byte[1] { 0x13 }) ); mem.UpdateBytes("a/b/c.dat", new byte[0]); Assert.Empty( mem.Knowledge("") ); }