Пример #1
0
 public void TestWithSimpleDirectory()
 {
     var assetPath = new UDirectory("/a/b/c");
     Assert.AreEqual("/a/b/c", assetPath.GetDirectory());
     Assert.AreEqual("/a/b/c", assetPath.FullPath);
     var directory = new UDirectory("C:/a");
     Assert.AreEqual("/a", directory.GetDirectory());
     directory = new UDirectory("/a");
     Assert.AreEqual("/a", directory.GetDirectory());
 }
Пример #2
0
        public void TestIsDirectoryOnly()
        {
            var dirPath = new UDirectory("/a/b/c");
            Assert.AreEqual("/a/b/c", dirPath.GetDirectory());

            var filePath = new UFile("/test.txt");
            Assert.AreEqual("/", filePath.GetDirectory());
            Assert.AreEqual("test.txt", filePath.GetFileNameWithExtension());
        }