public void Generates_absolute_path_without_double_slash()
        {
            var packager = new MockPackager();
            var item     = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "foo"));

            Assert.AreEqual("absolute/foo/page.xml", packager.GetFilename(item));
        }
        public void Generates_relative_path_for_double_slash()
        {
            var packager = new MockPackager();
            var item     = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "//foo"));

            Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
        }
        public void Conflicting_unknown_types_get_numbered()
        {
            var packager = new MockPackager();
            var item     = new ExportItem(null, null, 0, new XDoc("widget").Elem("path", "//foo"));

            Assert.AreEqual("relative/foo/widget.dat", packager.GetFilename(item));
            Assert.AreEqual("relative/foo/widget.dat", packager.GetFilename(item));
        }
        public void Conflicting_pages_get_numbered()
        {
            var packager = new MockPackager();
            var item     = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "//foo"));

            Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
            Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
        }
 public void Generates_absolute_path_without_double_slash() {
     var packager = new MockPackager();
     var item = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "foo"));
     Assert.AreEqual("absolute/foo/page.xml", packager.GetFilename(item));
 }
 public void Generates_relative_path_for_double_slash() {
     var packager = new MockPackager();
     var item = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "//foo"));
     Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
 }
 public void Conflicting_unknown_types_get_numbered() {
     var packager = new MockPackager();
     var item = new ExportItem(null, null, 0, new XDoc("widget").Elem("path", "//foo"));
     Assert.AreEqual("relative/foo/widget.dat", packager.GetFilename(item));
     Assert.AreEqual("relative/foo/widget.dat", packager.GetFilename(item));
 }
 public void Conflicting_pages_get_numbered() {
     var packager = new MockPackager();
     var item = new ExportItem(null, null, 0, new XDoc("page").Elem("path", "//foo"));
     Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
     Assert.AreEqual("relative/foo/page.xml", packager.GetFilename(item));
 }