|
|
@@ -2,6 +2,7 @@
|
|
|
using SharpGLTF.Schema2;
|
|
|
using SharpGLTF.Validation;
|
|
|
using System;
|
|
|
+using System.IO;
|
|
|
|
|
|
namespace SharpGLTF
|
|
|
{
|
|
|
@@ -16,11 +17,18 @@ namespace SharpGLTF
|
|
|
|
|
|
var fileName = ResourceInfo.From("_");
|
|
|
|
|
|
+ TestContext.WriteLine("Dumping current Resource context:");
|
|
|
+
|
|
|
foreach(var f in fileName.File.Directory.EnumerateDirectories("*",System.IO.SearchOption.AllDirectories))
|
|
|
{
|
|
|
TestContext.WriteLine($"{f.Exists} {f.FullName}");
|
|
|
}
|
|
|
|
|
|
+ foreach (var f in fileName.File.Directory.EnumerateFiles("*", System.IO.SearchOption.AllDirectories))
|
|
|
+ {
|
|
|
+ TestContext.WriteLine($"{f.Exists} {f.FullName}");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// Test files are from https://github.com/CesiumGS/3d-tiles-validator/tree/main/specs/data/gltfExtensions/
|
|
|
@@ -37,6 +45,10 @@ namespace SharpGLTF
|
|
|
{
|
|
|
var fileName = ResourceInfo.From(file);
|
|
|
|
|
|
+ var exists = fileName.File.Exists;
|
|
|
+ var text = fileName.ReadAllText();
|
|
|
+ TestContext.WriteLine($"{exists} {text.Length}");
|
|
|
+
|
|
|
if (exception != null)
|
|
|
{
|
|
|
Assert.Throws(exception, delegate { ModelRoot.Load(fileName); });
|