docs.unity3d.com
    Show / Hide Table of Contents

    Class FakeAsyncUtil

    Fake async web client for testing.

    Calls either success or failure response handlers synchronously, depending on whether error or successResponse is set.

    Inheritance
    Object
    FakeAsyncUtil
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Tests
    Syntax
    public class FakeAsyncUtil : IAsyncWebUtil

    Constructors

    FakeAsyncUtil()

    Declaration
    public FakeAsyncUtil()

    Fields

    calledGet

    Declaration
    public static bool calledGet
    Field Value
    Type Description
    Boolean

    calledPost

    Declaration
    public static bool calledPost
    Field Value
    Type Description
    Boolean

    errorResponse

    Declaration
    public string errorResponse
    Field Value
    Type Description
    String

    successResponse

    Declaration
    public string successResponse
    Field Value
    Type Description
    String

    Methods

    Get(String, Action<String>, Action<String>, Int32)

    Declaration
    public void Get(string url, Action<string> responseHandler, Action<string> errorHandler, int maxTimeoutInSeconds)
    Parameters
    Type Name Description
    String url
    Action<String> responseHandler
    Action<String> errorHandler
    Int32 maxTimeoutInSeconds

    Post(String, String, Action<String>, Action<String>, Int32)

    Declaration
    public void Post(string url, string body, Action<string> responseHandler, Action<string> errorHandler, int maxTimeoutInSeconds)
    Parameters
    Type Name Description
    String url
    String body
    Action<String> responseHandler
    Action<String> errorHandler
    Int32 maxTimeoutInSeconds

    Schedule(Action, Int32)

    Declaration
    public void Schedule(Action a, int delayInSeconds)
    Parameters
    Type Name Description
    Action a
    Int32 delayInSeconds
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023