public IEnumerator Test_MoveAbility() { MoverAbilityInternal moverAbility = new MoverAbilityInternal(); GameObject startLocationObject = new GameObject(); startLocationObject.transform.position = new Vector2(0, 0); Locations startLocations = new Locations(startLocationObject.transform, startLocationObject.transform.position, false); GameObject endLocationObject = new GameObject(); endLocationObject.transform.position = new Vector2(0, 20); Locations endLocations = new Locations(endLocationObject.transform, endLocationObject.transform.position, false); IPokerOwner parent = Substitute.For <IPokerOwner>(); parent.speed = 2f; GameObject card = new GameObject("card"); Card po = card.AddComponent <Card>(); ISpriteSwaperAbility swaperAbility = Substitute.For <ISpriteSwaperAbility>(); ICardFlipAbility cardFlipAbility = Substitute.For <ICardFlipAbility>(); moverAbility.Move(new List <IPokerObject>() { po as IPokerObject }, new List <Locations>() { startLocations }, new List <Locations>() { endLocations }, parent, true, true, swaperAbility, cardFlipAbility); yield return(new WaitForSeconds(parent.speed + 0.5f)); Assert.AreEqual(endLocationObject.transform.position, po.transform.position); }
private void Awake() { moverAbilityInternal = new MoverAbilityInternal(); }