示例#1
0
        public void LandingOnGoIncreaseBalanceByTwoHundres()
        {
            var banker = new Banker();
            var go = new Go("Go", 0, banker);
            Player player = new Player("Player");
            var playerStartingBalance = player.Balance;
            go.LandOn(player);

            Assert.AreEqual(200, player.Balance - playerStartingBalance);
        }
示例#2
0
 private static DropDownListPage GoToTestPage()
 {
     return(Go.To <DropDownListPage>());
 }
 public static GoTween colorFrom(this Material self, float duration, Color endValue, GoMaterialColorType colorType = GoMaterialColorType.Color)
 {
     return(Go.from(self, duration, new GoTweenConfig().materialColor(endValue, colorType)));
 }
 public static GoTween shake(this Transform self, float duration, Vector3 shakeMagnitude, GoShakeType shakeType = GoShakeType.Position, int frameMod = 1, bool useLocalProperties = false)
 {
     return(Go.to(self, duration, new GoTweenConfig().shake(shakeMagnitude, shakeType, frameMod, useLocalProperties)));
 }
 protected override void OnSetUp()
 {
     _page = Go.To <FindingWithSettingsPage>();
 }
示例#6
0
 private void GoCall(string name)
 {
     Debug.Log(name);
     Go?.Invoke();
 }
示例#7
0
 public void Home()
 {
     Go.To <HomePage>().
     Header.Should.Equal("Atata Sample App");
 }
示例#8
0
 protected override void OnSetUp()
 {
     _page = Go.To <FindingPage>();
 }
 public static GoTween colorFrom(this Material self, float duration, float endValue, string propertyName)
 {
     return(Go.from(self, duration, new GoTweenConfig().materialFloat(endValue, propertyName)));
 }
示例#10
0
 public void Home_ShouldHaveCorrectTitle_WhenOpened()
 {
     Go.To <HomePage>().PageTitle.Should
     .Equal(
         "Amazon.de: Günstige Preise für Elektronik & Foto, Filme, Musik, Bücher, Games, Spielzeug & mehr");
 }
示例#11
0
 protected override void Start()
 {
     LayoutElement = Go.GetComponent <LayoutElement>();
 }
示例#12
0
        public void BasicControlInteraction()
        {
            string firstName;

            Go.To <BasicControlsPage>().
            Header.Should.Equal("Basic Controls").

            ByLabel.FirstName.Should.Exist().
            ByLabel.FirstName.Should.BeEnabled().
            ByLabel.FirstName.Should.Not.AtOnce.BeReadOnly().
            ByLabel.FirstName.SetRandom(out firstName).
            ByLabel.FirstName.Should.Equal(firstName).
            ById.FirstName.Should.Equal(firstName).

            ByLabel.LastName.Set("LastName").
            ByLabel.LastName.Should.Equal("LastName").
            ById.LastName.Should.Equal("LastName").

            ById.MiddleName.Set("mdname").
            Do(_ => _.ByLabel.MiddleName, x =>
            {
                x.Should.Equal("mdname");
                x.Set("md2name");
                x.Should.Not.Equal("mdname");
            }).
            ById.MiddleName.Should.Equal("md2name").

            ByLabel.ReadonlyField.Should.Exist().
            ByLabel.ReadonlyField.Should.BeEnabled().
            ByLabel.ReadonlyField.Should.BeReadOnly().
            ByLabel.ReadonlyField.IsReadOnly.Should.BeTrue().
            ByLabel.ReadonlyField.Attributes.ReadOnly.Should.BeTrue().
            ByLabel.ReadonlyField.Should.Equal("readme").

            ByLabel.DisabledField.Should.Exist().
            ByLabel.DisabledField.Should.Not.BeEnabled().
            ByLabel.DisabledField.IsEnabled.Should.Not.BeTrue().
            ByLabel.DisabledField.Attributes.Disabled.Should.BeTrue().
            ByLabel.DisabledField.Should.Not.BeReadOnly().
            ByLabel.DisabledField.Should.Equal("readme").

            RawButtonControl.Should.Exist().
            RawButtonControl.Should.BeEnabled().
            RawButtonControl.Content.Should.Equal("Raw Button").
            RawButtonControl.Click().
            InputButtonControl.Should.Exist().
            InputButtonControl.Click().
            Do(_ => _.LinkButtonControl, x =>
            {
                x.Should.Exist();
                x.Content.Should.Equal("Link Button");
                x.Content.Should.StartWith("Link");
                x.Content.Should.EndWith("utton");
                x.Content.Should.Contain("ink Butto");
                x.Content.Should.ContainIgnoringCase("k but");
                x.Click();
            }).
            ClickableControl.Should.Exist().
            ClickableControl.Click().
            DisabledButtonControl.Should.Exist().
            DisabledButtonControl.Should.BeDisabled().
            MissingButtonControl.Should.Not.Exist();
        }
示例#13
0
 protected override void OnSetUp()
 {
     page = Go.To <StubPage>();
 }
示例#14
0
 public void ExtentReports_Test1()
 {
     Go.To <HomePage>()
     .Report.Screenshot()
     .Header.Should.Contain("Atata");
 }
 public void Trigger_WaitForElement_MissingOrHidden()
 {
     Go.To <WaitingPage>().
     ButtonWithMissingOrHiddenWait.Click().
     Result.Should.AtOnce.Exist();
 }
示例#16
0
 private void OnApplicationQuit()
 {
     _instance = null;
     Destroy( gameObject );
     _applicationIsQuitting = true;
 }
 public void Trigger_WaitForElement_VisibleThenHidden()
 {
     Go.To <WaitingPage>().
     ButtonWithVisibleAndHiddenWait.Click().
     Result.Should.AtOnce.Exist();
 }
 public static GoTween rotationTo(this Transform self, float duration, Quaternion endValue, bool isRelative = false)
 {
     return(Go.to(self, duration, new GoTweenConfig().rotation(endValue, isRelative)));
 }
 /// <summary>Executes the specified trigger action.</summary>
 /// <typeparam name="TOwner">The type of the owner page object.</typeparam>
 /// <param name="context">The trigger context.</param>
 protected override void Execute <TOwner>(TriggerContext <TOwner> context)
 {
     Go.To <DeletionConfirmationBSModal <TOwner> >(temporarily: true).
     Delete();
 }
 public static GoTween colorTo(this Material self, float duration, Color endValue, string colorName = "_Color")
 {
     return(Go.to(self, duration, new GoTweenConfig().materialColor(endValue, colorName)));
 }
示例#21
0
    public void MoveToPublicAreaForFlat()
    {
        var Tut = GameManager.Instance.GetComponent <Tutorial> ();

        //		SelectedPublicArea = PublicAreas [i];
        CharacterOriginalPosition = PlayerManager.Instance.MainCharacter.transform.position;

        Camera.main.transform.position = new Vector3(212f, 4.8f, -10f);
//		transform.GetChild (0).GetComponent <SpriteRenderer> ().sprite = SelectedPublicArea.Background;
        GameObject Go;

        if (!Tut.HostPartyCreated)
        {
            SelectedPublicArea = PublicAreas [5];
            Go = Instantiate(SelectedPublicArea.BackgroundPrefab, new Vector3(211, 5, 0), Quaternion.identity) as GameObject;
        }
        else
        {
            Go = Instantiate(SelectedPublicArea.BackgroundPrefab, new Vector3(211, 5, 0), Quaternion.identity) as GameObject;
        }

        CurrentPublicArea = Go.GetComponent <MultiplayerPositions> ();
        Go.name           = "FlatPartyPublicArea";
        GameObject roomConcatiner = GameObject.Instantiate(HostPartyManager.Instance.FlatPartyRoomContainer, Vector3.zero, Quaternion.identity) as GameObject;

        roomConcatiner.transform.parent        = Go.transform;
        roomConcatiner.transform.localPosition = Vector3.zero;
        roomConcatiner.name = "FlatpartyRoomContainer";
        Camera.main.GetComponent <DragCamera1> ().enabled           = false;
        Camera.main.GetComponent <DragableCamera> ().enabled        = true;
        Camera.main.GetComponent <DragableCamera> ().RestrictedMinX = SelectedPublicArea.Starting_x;
        Camera.main.GetComponent <DragableCamera> ().RestrictedMaxX = SelectedPublicArea.Ending_x;
        Camera.main.GetComponent <DragableCamera> ().RestrictedMaxY = SelectedPublicArea.Starting_y;
        Camera.main.GetComponent <DragableCamera> ().RestrictedMinY = SelectedPublicArea.Ending_y;


        Camera.main.orthographicSize = 10f;

//		GameObject Flat = Instantiate (RoomPurchaseManager.Instance.RoomTypePrefeb [1], new Vector3 (212, -3, 0), Quaternion.identity) as GameObject;
//		Flat.name = "FlatPartyRoom";

        HostPartyManager.Instance.SelectedPartyDecor.Clear();
        SetRoomAndDecorForFlatParty();

        GameObject[] room       = GameObject.FindGameObjectsWithTag("SocietyRoom");
        int          randomRoom = UnityEngine.Random.Range(0, room.Length);

        if (Tut.HostPartyCreated)
        {
            ChatManager.Instance.MessageCountForFlatParty = 0;
            HostPartyManager.Instance.SpwanRealPlayerForFlatParty(room [randomRoom]);
        }
        else
        {
            // Spwan Offline player for flat party.
            HostPartyManager.Instance.SpwanPlayerForOfllineFlatParty(room [randomRoom]);
        }
        DisableWalls();
        //Delete all old messeage gameobjects in scene....
//		for (int x = 0; x < ChatManager.Instance.message_panel.childCount; x++) {
//			Destroy (ChatManager.Instance.message_panel.GetChild (x).gameObject);
//		}
    }
 public static GoTween vectorTo(this Material self, float duration, Vector4 endValue, string propertyName)
 {
     return(Go.to(self, duration, new GoTweenConfig().materialVector(endValue, propertyName)));
 }
示例#23
0
 protected override void OnSetUp()
 {
     _page = Go.To <InputPage>();
 }
示例#24
0
 protected override void OnSetUp()
 {
     page = Go.To <ScrollablePage>();
 }
 public static GoTween localPositionTo(this Transform self, float duration, Vector3 endValue, bool isRelative = false)
 {
     return(Go.to(self, duration, new GoTweenConfig().localPosition(endValue, isRelative)));
 }
 private static DatePickerPage GoToTestPage()
 {
     return(Go.To <DatePickerPage>());
 }
 public static GoTween scaleFrom(this Transform self, float duration, Vector3 endValue, bool isRelative = false)
 {
     return(Go.from(self, duration, new GoTweenConfig().scale(endValue, isRelative)));
 }
示例#28
0
    // Update is called once per frame
    void Update()
    {
        //states (set by the board manager only) are used to start animations and different visual effects.
        if (Data.state == VOTile.STATE_MOVING)
        {
            Data.state = VOTile.STATE_ANIMATING;

            runningAnimation = Go.to(transform, 0.5f, new GoTweenConfig().localPosition(new Vector3(Data.column * DISTANCE_BETWEEN_TILES_X, Data.row * DISTANCE_BETWEEN_TILES_Y)).setEaseType(GoEaseType.SineInOut));
        }

        if (Data.state == VOTile.STATE_SPAWN)
        {
            transform.localScale = new Vector3(0.0f, 0.0f, 0.0f);

            runningAnimation = Go.to(transform, 0.5f, new GoTweenConfig().scale(1.0f).setEaseType(GoEaseType.BounceOut));
            Data.state       = VOTile.STATE_ANIMATING;

            transform.localPosition = new Vector3(Data.column * DISTANCE_BETWEEN_TILES_X, Data.row * DISTANCE_BETWEEN_TILES_Y);
        }

        if (Data.state == VOTile.STATE_ANIMATING)
        {
            if (runningAnimation.state == GoTweenState.Destroyed)
            {
                if (tileHasExpired == false)
                {
                    Data.state = VOTile.STATE_IDLE;
                }
                else
                {
                    Destroy(gameObject);
                }
            }
        }

        if (Data.state == VOTile.STATE_DIE)
        {
            tileHasExpired   = true;
            Data.state       = VOTile.STATE_ANIMATING;
            runningAnimation = Go.to(transform, 0.5f, new GoTweenConfig().scale(0.0f));
        }

        if (Data.state == VOTile.STATE_IDLE)
        {
            transform.localPosition = new Vector3(Data.column * DISTANCE_BETWEEN_TILES_X, Data.row * DISTANCE_BETWEEN_TILES_Y);
        }

        if (Data.value > 0)
        {
            label.text = Data.value.ToString();

            if (Data.value == 1)
            {
                background.color = Color.red;
            }
            else if (Data.value == 2)
            {
                background.color = Color.cyan;
            }
            else
            {
                background.color = Color.white;
            }
        }
        else
        {
            label.text       = "J";
            background.color = Color.magenta;
        }
    }
 // to tweens
 public static GoTween eularAnglesTo(this Transform self, float duration, Vector3 endValue, bool isRelative = false)
 {
     return(Go.to(self, duration, new GoTweenConfig().eulerAngles(endValue, isRelative)));
 }
示例#30
0
 protected override void OnSetUp()
 {
     page = Go.To <ImagePage>();
 }
示例#31
0
 public Migration(Go direction, MigrationSpecification spec)
 {
     this.Direction = direction;
     this.Spec = spec;
 }
示例#32
0
 protected override void OnSetUp()
 {
     page = Go.To <SwitchPage>();
 }
示例#33
0
文件: Go.cs 项目: squirr3l/GoKit
 private void OnApplicationQuit()
 {
     _instance = null;
     Destroy( gameObject );
 }
示例#34
0
 override public void Start()
 {
     this.alpha = 0.0f;
     Go.to(this, 1.0f, new TweenConfig().alpha(1.0f));
 }