Пример #1
0
    protected override IEnumerator Run()
    {
        //Check that the JauntPlayer object only has the JauntPlayer script and the Transform component
        GameObject jauntPlayerObj = GameObject.Find("JauntPlayer");

        IntegrationTest.Assert(jauntPlayerObj != null);
        JauntPlayer jauntPlayer = jauntPlayerObj.GetComponent(typeof(JauntPlayer)) as JauntPlayer;

        IntegrationTest.Assert(jauntPlayer != null, "Jaunt Player is null!");

        Destroy(jauntPlayerObj.GetComponent(typeof(JauntPlayer)));
        yield return(null);

        int numComponents = jauntPlayerObj.GetComponents(typeof(Component)).Length;

        IntegrationTest.Assert(numComponents == 1, "Number of JauntPlayer components is " + numComponents + ", should be 1");         //Only the transform component should be left

        //Check that the AutoPlayer object only has the AutoPlayer script and the Transform component
        GameObject jauntAutoplayObj = GameObject.Find("JauntAutoplay");

        IntegrationTest.Assert(jauntAutoplayObj != null);
        JauntAutoplay jauntAutoplay = jauntAutoplayObj.GetComponent(typeof(JauntAutoplay)) as JauntAutoplay;

        IntegrationTest.Assert(jauntAutoplay != null, "JauntAutoplay is null!");

        Destroy(jauntAutoplayObj.GetComponent(typeof(JauntAutoplay)));
        yield return(null);

        numComponents = jauntPlayerObj.GetComponents(typeof(Component)).Length;
        IntegrationTest.Assert(numComponents == 1, "Number of JauntAutoplay components is " + numComponents + ", should be 1");

        yield return(null);
    }
Пример #2
0
    protected override IEnumerator Run()
    {
        GameObject    jauntAutoplayObj = GameObject.Find("JauntAutoplay");
        JauntAutoplay jauntAutoplay    = jauntAutoplayObj.GetComponent <JauntAutoplay>();

        IntegrationTest.Assert(jauntAutoplay != null);
        IntegrationTest.Assert(jauntAutoplay.autoplayUrl == defaultUrl, "JauntAutoplay default url is not configured correctly");



        yield return(null);
    }
    protected override IEnumerator Run()
    {
        //Check that the JauntAutoplay and JauntPlayer objects exists
        JauntPlayer jauntPlayer = FindObjectOfType(typeof(JauntPlayer)) as JauntPlayer;

        IntegrationTest.Assert(jauntPlayer != null && jauntPlayer.gameObject != null, "Cannot find JauntPlayer object!");

        JauntAutoplay jauntAutoplay = FindObjectOfType(typeof(JauntAutoplay)) as JauntAutoplay;

        IntegrationTest.Assert(jauntAutoplay != null && jauntAutoplay.gameObject != null, "Cannot find JauntAutoplay object!");

        Camera cam = FindObjectOfType(typeof(Camera)) as Camera;

        IntegrationTest.Assert(cam != null && cam.gameObject != null, "Cannot find camera object!");

        yield return(null);
    }