Ejemplo n.º 1
0
        public void FindsCorrectDeleteRoot()
        {
            string path = "Some/Test/Path";
            var    root = Path.Combine("Assets", "Some");

            using (var tp = new TemporaryAssetPath(path))
                Assert.That(tp.m_DeleteRoot, Is.EqualTo(root), () => string.Format("Expected: {0}, Actual: {1}", root, tp.m_DeleteRoot));
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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>());
     }
 }
 private void WithPathAndAsset(Action <string, HexMapGenerationParameters> test)
 {
     using (var path = new TemporaryAssetPath("TestData"))
     {
         var assetPath = Path.Combine(path.path, ParameterTestObjectName);
         using (var assetScope = new TemporaryAssetScope <HexMapGenerationParameters>(assetPath))
         {
             // ensure OnValidate has been called.
             [email protected]();
             test(assetScope.assetPath, assetScope.@object);
         }
     }
 }