예제 #1
0
        public void CheckPlayerAvailabilityCount_With_Not_Equal_Amount_Of_Players()
        {
            //Arrange
            PlayerManagerBehaviour behaviour = new PlayerManagerBehaviour(mat);

            //Assert
            Assert.Catch(() => { behaviour.CheckPlayerAvailabilityCount(new IPlatform[2]); });
        }
예제 #2
0
        public void GetPositionFromDirection_With_Up_Direction()
        {
            //Arrange
            PlayerManagerBehaviour behaviour = new PlayerManagerBehaviour(mat);
            Direction dir      = Direction.UP;
            Vector3   expected = new Vector3(0, 4);
            //Act
            Vector3 actual = behaviour.GetPositionFromDirection(dir);

            //Assert
            Assert.AreEqual(actual, expected);
        }
예제 #3
0
        public void PlatformInitialize_With_Up_Direction_And_Intialize_Ran()
        {
            //Arrange
            PlayerManagerBehaviour behaviour = new PlayerManagerBehaviour(mat);
            IPlatform     playerPlat         = Substitute.For <IPlatform>();
            Direction     dir       = Direction.UP;
            Player        player    = Player.PLAYER_ONE;
            ControlScheme placement = ControlScheme.KEYS;

            //Act
            behaviour.PlatformInitialize(playerPlat, dir, player, placement);

            //Assert
            playerPlat.ReceivedWithAnyArgs().Initialize(default, default, default, default, default, default);