public void CanImport() { if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath)) { Assert.Ignore("Ignoring test because the environment is not properly configured"); } using (var tp = new TemporaryAssetPath(kImportTestPath)) Assert.That(() => MagicLeapRemoteImportSupport.ImportSupportLibrares(tp.path), Throws.Nothing); }
public void FallbackToDefaultShimLogicIfDiscoveryFileIsMissing() { if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath)) { Assert.Ignore("Ignoring test because the environment is not properly configured"); } var paths = MagicLeapRemoteImportSupport.ParseDiscoveryData(MagicLeapRemoteImportSupport.discoveryFileOrFallbackData).ToArray(); Assert.That(paths.Length, Is.GreaterThanOrEqualTo(2)); }
public void AttemptingToImportOverExistingFilesThrowsException() { if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath)) { Assert.Ignore("Ignoring test because the environment is not properly configured"); } using (var tp = new TemporaryAssetPath(kImportTestPath)) { MagicLeapRemoteImportSupport.ImportSupportLibrares(tp.path); Assert.That(() => MagicLeapRemoteImportSupport.ImportSupportLibrares(tp.path), Throws.InstanceOf <ImportFailureException>()); } }
public void ShimPathsDiscoveryHasASearchPathForHost() { if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath)) { Assert.Ignore("Ignoring test because the environment is not properly configured"); } if (!MagicLeapRemoteImportSupport.hasDiscoveryFile) { Assert.Ignore("Shim discovery file not found, ignoring test"); } var paths = MagicLeapRemoteImportSupport.ParseDiscoveryData(File.ReadAllLines(Path.Combine(MagicLeapRemoteImportSupport.sdkPath, MagicLeapRemoteImportSupport.kShimDiscoveryPath))).ToArray(); Assert.That(paths.Length, Is.GreaterThanOrEqualTo(2)); }
public void CanResolveMLIdentityLibrary() { if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath)) { Assert.Ignore("Ignoring test because the environment is not properly configured"); } string path; using (var tp = new TemporaryAssetPath(kImportTestPath)) { Assert.That(() => MagicLeapRemoteImportSupport.ImportSupportLibrares(tp.path), Throws.Nothing); Assert.That(MagicLeapRemoteImportSupport.TryResolveMLPluginPath("ml_identity", out path), Is.True); Assert.That(path, Is.Not.Null); Assert.That(path.EndsWith(MagicLeapRemoteImportSupport.hostExtension), Is.True); } }
public void Setup() { var tp = new TemporaryAssetPath(kImportTestPath); MagicLeapRemoteImportSupport.ImportSupportLibrares(tp.path); }