diff --git a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/DiskCheckTests.cs b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/DiskCheckTests.cs index d6c8887..b8f1705 100644 --- a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/DiskCheckTests.cs +++ b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/DiskCheckTests.cs @@ -1,5 +1,6 @@ using System.Collections; using NUnit.Framework; +using Raindrop.Bootstrap; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.TestTools; @@ -12,14 +13,13 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests [UnityTest] public IEnumerator StaticCacheCopier_Test() { - SceneManager.LoadScene("Raindrop/Bootstrap/BootstrapScene"); + RaindropLoader.Load(); yield return new WaitForSeconds(3); Assert.True(StaticFilesCopier.GetInstance().CopyIsDoneAndNoErrors); + + RaindropLoader.Unload(); } - - - } } \ No newline at end of file diff --git a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/EulaAcceptanceTests.cs b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/EulaAcceptanceTests.cs index c30136a..94a4b35 100644 --- a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/EulaAcceptanceTests.cs +++ b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/EulaAcceptanceTests.cs @@ -2,6 +2,7 @@ using NUnit.Framework; using OpenMetaverse; using Plugins.CommonDependencies; +using Raindrop.Bootstrap; using Raindrop.Services; using Raindrop.Tests.RaindropFullIntegrationTests.InputSubroutines; using UnityEngine; @@ -49,7 +50,7 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests // 4. restart the ui and check it is showing welcome screen public IEnumerator Can_Accept_EULA() { - SceneManager.LoadScene("Raindrop/Bootstrap/BootstrapScene"); + RaindropLoader.Load(); yield return new WaitForSeconds(2); //1. reject the EULA @@ -87,6 +88,8 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests { Assert.Pass(); } + + RaindropLoader.Unload(); yield break; } } diff --git a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/LoginTests.cs b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/LoginTests.cs index 73e80d1..fcc2e42 100644 --- a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/LoginTests.cs +++ b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/LoginTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NUnit.Framework; using Plugins.CommonDependencies; +using Raindrop.Bootstrap; using Raindrop.Netcom; using Raindrop.Services; using Raindrop.Tests.RaindropFullIntegrationTests.InputSubroutines; @@ -26,15 +27,13 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests public void OneTimeSetUp() { //load the main scene. - SceneManager.LoadScene("Raindrop/Bootstrap/BootstrapScene"); + RaindropLoader.Load(); } [OneTimeTearDown] public void OneTimeTearDown() { - //unload raindropInstance. - instance.CleanUp(); // todo: this will do for now, but we should use RaindropBootstrapper.Quit_Application() for full teardown (which includes netcom). - // instance.CleanUp(); + RaindropLoader.Unload(); } [UnityTest] diff --git a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/MapServiceTests.cs b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/MapServiceTests.cs index b537634..a2c1731 100644 --- a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/MapServiceTests.cs +++ b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/MapServiceTests.cs @@ -1,6 +1,7 @@ using System.Collections; using NUnit.Framework; using Plugins.CommonDependencies; +using Raindrop.Bootstrap; using Raindrop.Map.Model; using UnityEngine; using UnityEngine.SceneManagement; @@ -17,7 +18,13 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests public void OneTimeSetUp() { //load the main scene. - SceneManager.LoadScene("Raindrop/Bootstrap/BootstrapScene"); + RaindropLoader.Load(); + } + + [OneTimeTearDown] + public void OneTimeTearDown() + { + RaindropLoader.Unload(); } // test that the (external) map fetcher code is working. diff --git a/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs b/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs index 01f0343..9adb0ad 100644 --- a/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs +++ b/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs @@ -3,6 +3,7 @@ using System.IO; using Disk; using NUnit.Framework; using OpenMetaverse; +using Raindrop.Bootstrap; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.TestTools; @@ -20,7 +21,7 @@ namespace Tests.Raindrop.RaindropIntegrationTests DeleteLocalCacheFiles(); // 2. start main scene, which includes the startupCopier - SceneManager.LoadScene("Raindrop/Bootstrap/BootstrapScene"); + RaindropLoader.Load(); //wait for abit... yield return new WaitForSeconds(10); @@ -29,12 +30,10 @@ namespace Tests.Raindrop.RaindropIntegrationTests "grids.xml"); Assert.True(File.Exists(expectedToExist),"file not exist: " + expectedToExist); - // - // SceneManager.LoadScene("Scenes/empty"); - // SceneManager.UnloadSceneAsync("Raindrop/Bootstrap/BootstrapScene"); - // yield return new WaitForSeconds(2); - + // 3. don't forget to unload the scene! + RaindropLoader.Unload(); + yield break; } diff --git a/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs.meta b/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs.meta index fa82c0c..771dd86 100644 --- a/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs.meta +++ b/Assets/Tests/Raindrop/RaindropIntegrationTests/StaticAssetsCopierTests.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 -guid: 021b88811717459fb1339d40a8d4f6cb -timeCreated: 1643179061 \ No newline at end of file +fileFormatVersion: 2 +guid: 100f80f8b4fb3664ca6fe482fcae6abf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: