コード例 #1
0
        public void TestFind__NotFound()
        {
            UrlDir urlDir = UrlBuilder.CreateDir("abc");

            UrlBuilder.CreateDir("def", urlDir);

            Assert.Null(urlDir.Find("def/ghi"));
        }
コード例 #2
0
        public void TestFind__DirectChild()
        {
            UrlDir urlDir = UrlBuilder.CreateDir("abc");

            UrlDir.UrlFile urlFile = UrlBuilder.CreateFile("def.cfg", urlDir);

            Assert.Equal(urlFile, urlDir.Find("def"));
        }
コード例 #3
0
        public void TestFind__Extension__NotFound()
        {
            UrlDir urlDir = UrlBuilder.CreateDir("abc");

            UrlBuilder.CreateFile("def/ghi.yyy", urlDir);
            UrlBuilder.CreateFile("def/ghi.zzz", urlDir);

            Assert.Null(urlDir.Find("def/ghi.cfg"));
        }
コード例 #4
0
        public void TestFind__Extension()
        {
            UrlDir urlDir = UrlBuilder.CreateDir("abc");

            UrlBuilder.CreateFile("def/ghi.yyy", urlDir);
            UrlDir.UrlFile urlFile = UrlBuilder.CreateFile("def/ghi.cfg", urlDir);
            UrlBuilder.CreateFile("def/ghi.zzz", urlDir);

            Assert.Equal(urlFile, urlDir.Find("def/ghi.cfg"));
        }
コード例 #5
0
        public void TestFind__IntermediateDirectoryNotFound()
        {
            UrlDir urlDir = UrlBuilder.CreateDir("abc");

            Assert.Null(urlDir.Find("def/ghi"));
        }