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

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

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

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

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