Last active
December 11, 2017 14:15
-
-
Save tsubaki/3fc71674dd182aa8765f1cf309aa29c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.TestTools; | |
using NUnit.Framework; | |
using System.Collections; | |
using UnityEngine.Networking; | |
using UnityEngine.SceneManagement; | |
public class 適当なテスト { | |
string url = "https://cdn1.www.st-hatena.com/users/ts/tsubaki_t1/profile.gif?1393258892"; | |
[UnityTest] | |
public IEnumerator ファイルをWebRequestでダウンロードする() { | |
UnityWebRequest request = new UnityWebRequest (url); | |
var textureHandler = new DownloadHandlerTexture (false); | |
request.downloadHandler = textureHandler; | |
var send = request.SendWebRequest (); | |
while (!send.isDone) { | |
yield return null; | |
} | |
Assert.AreEqual (2876, textureHandler.data.Length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment