From 235debb5d698611bcfc7e7f2de38fcc21aafc81b Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Sat, 9 Jul 2022 00:24:45 +0800 Subject: [PATCH] make 'login and download profile pic' test pass. --- .../LMV_ExtendedTests/LMV_ImageFetchingTests.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Assets/Tests/LMV_ExtendedTests/LMV_ImageFetchingTests.cs b/Assets/Tests/LMV_ExtendedTests/LMV_ImageFetchingTests.cs index 572c9e4..850a422 100644 --- a/Assets/Tests/LMV_ExtendedTests/LMV_ImageFetchingTests.cs +++ b/Assets/Tests/LMV_ExtendedTests/LMV_ImageFetchingTests.cs @@ -28,7 +28,6 @@ namespace Raindrop.Tests.LMV_ExtendedTests [OneTimeSetUp] public void OneTimeSetUp() { - //make the main thread dispatcher GameObject mainThreadDispatcher = new GameObject("mainThreadDispatcher"); mainThreadDispatcher.AddComponent(); @@ -188,16 +187,18 @@ namespace Raindrop.Tests.LMV_ExtendedTests } // able to login and grab a user's profile pic and save to disk - [Test] - public IEnumerator LoginAndDownloadJ2P() + [UnityTest] + public IEnumerator LoginAndDownloadJp2() { Helpers.LoginHeadless(instance, 0, "Hooper"); yield return new WaitForSeconds(15); //request that image (using DownloadManager) - instance.Client.Assets.RequestImage(UUID.Parse( - "ed891aaa-b031-cd08-77d7-4d0a15a2b8c5"), //nuki face. SL. + instance.Client.Assets.RequestImage( + UUID.Parse( + "ed891aaa-b031-cd08-77d7-4d0a15a2b8c5" + ), //a user's profile picture. SecondLife. ImageType.Normal, Callback_DecodeAndSaveFileAsPNG, false); @@ -205,8 +206,6 @@ namespace Raindrop.Tests.LMV_ExtendedTests yield return new WaitForSeconds(10); instance.Client.Network.Logout(); yield return new WaitForSeconds(10); - - yield break; } // Callback for DownloadManager. @@ -250,9 +249,7 @@ namespace Raindrop.Tests.LMV_ExtendedTests DirectoryHelpers.WriteToFile( bytes, Path.Combine(basepath, relativepath2)); - }); - } }