Пример #1
0
        public void IgnoreFileProtocol()
        {
            string localGoodSizeFile = Path.Combine(urlTestFiles, "GoodSize.html");
            string url = SethPath.ToUri(localGoodSizeFile);

            string outStr;

            Assert.IsFalse(UrlReader.TryParseUrl(url, out outStr));
            Assert.IsEmpty(outStr);
        }
Пример #2
0
        public void ToUriTests()
        {
            {
                string path         = @"D:\Seth\source\Chaskis\Chaskis\CodeCoverage\index.htm";
                string expectedPath = @"file:///D:/Seth/source/Chaskis/Chaskis/CodeCoverage/index.htm";

                Assert.AreEqual(expectedPath, SethPath.ToUri(path));
            }

            {
                string path         = "/home/seth/Downloads/canvas.png";
                string expectedPath = @"file:///home/seth/Downloads/canvas.png";

                Assert.AreEqual(expectedPath, SethPath.ToUri(path));
            }
        }
Пример #3
0
        // ---------------- Setup / Teardown ----------------

        //[OneTimeSetUp]
        public void FixtureSetup()
        {
            this.initFeed = Path.GetFullPath(
                Path.Combine(RssBotTestHelpers.RssTestFilesPath, "Reddit_Init.xml")
                );

            this.initLessItems = Path.GetFullPath(
                Path.Combine(RssBotTestHelpers.RssTestFilesPath, "Reddit_Init_Less_Items.xml")
                );

            this.updateFeed = Path.GetFullPath(
                Path.Combine(RssBotTestHelpers.RssTestFilesPath, "Reddit_Update.xml")
                );

            this.updateSameAmountFeed = Path.GetFullPath(
                Path.Combine(RssBotTestHelpers.RssTestFilesPath, "Reddit_Update_Same_Number.xml")
                );

            this.testFeedPath = Path.GetFullPath(
                "Test.xml"
                );

            this.testFeedUri = SethPath.ToUri(this.testFeedPath);
        }