Exemplo n.º 1
0
        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()
                );
        }
Exemplo n.º 2
0
        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()
                );
        }
Exemplo n.º 3
0
        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("")
                );
        }