Exemple #1
0
        public void FactoryReturnsPaper()
        {
            var move         = "P";
            var moveReturned = MoveFactory.GetMoveFor(move);

            Assert.IsType(typeof(Paper), moveReturned);
        }
Exemple #2
0
        public void Factory_Returns_Scissors()
        {
            var move         = "S";
            var moveReturned = MoveFactory.GetMoveFor(move);

            Assert.IsType(typeof(Scissors), moveReturned);
        }
Exemple #3
0
        public void Factory_Returns_Rock()
        {
            var move         = "R";
            var moveReturned = MoveFactory.GetMoveFor(move);

            Assert.IsType(typeof(Rock), moveReturned);
        }
Exemple #4
0
 public Player(string name, string move)
 {
     _name = name;
     _move = MoveFactory.GetMoveFor(move);
 }
Exemple #5
0
        public void Factory_Throws_NoSuchStrategyError()
        {
            var move = "T";

            Assert.Throws <NoSuchStrategyError>(() => MoveFactory.GetMoveFor(move));
        }