Example #1
0
        public void TestAbsoluteToRelative_ParentFolder()
        {
            var actual = ZipUtils.AbsolutePathToRelative("OEBPS/Text", "OEBPS/0000_Information.xhtml");

            Assert.AreEqual("../0000_Information.xhtml", actual);
        }
Example #2
0
        public void TestAbsoluteToRelative_SameLeafFolder()
        {
            var actual = ZipUtils.AbsolutePathToRelative("OEBPS/Text", "OEBPS/Text/0013_Chapter_1325_-_Song_Stupid.xhtml");

            Assert.AreEqual("0013_Chapter_1325_-_Song_Stupid.xhtml", actual);
        }
Example #3
0
        public void TestAbsoluteToRelative_SiblingFolder()
        {
            var actual = ZipUtils.AbsolutePathToRelative("OEBPS/Text", "OEBPS/Images/0000_Cover.jpeg");

            Assert.AreEqual("../Images/0000_Cover.jpeg", actual);
        }
Example #4
0
        public void TestAbsoluteToRelative_SameRootFolder2()
        {
            var actual = ZipUtils.AbsolutePathToRelative(null, "0013_Chapter_1325_-_Song_Stupid.xhtml");

            Assert.AreEqual("0013_Chapter_1325_-_Song_Stupid.xhtml", actual);
        }