Beispiel #1
0
        private IEnumerator UploadObjectTestTestInner(string url)
        {
            using (UnityWebRequestWrapper request = new UnityWebRequestWrapper(url, "PUT"))
            {
                yield return(request.Send());

                // verify the file is successfully put to the bucket
                if (request.IsError)
                {
                    Assert.Fail();
                }
            }
        }
Beispiel #2
0
        private IEnumerator DownloadObjectTestInner(string url)
        {
            using (UnityWebRequestWrapper request = new UnityWebRequestWrapper(url, "GET")) {
                yield return(request.Send());

                if (request.IsError)
                {
                    Assert.Fail();
                }
                else
                {
                    // verify the file get from the url is the one upload
                    byte[] dataGet = request.DownloadHandler.Data;
                    Assert.Equals(dataGet, System.IO.File.ReadAllBytes(FileName));
                }
            }
        }