Example #1
0
        public void TestingAddSeeds()
        {
            //ARRANGE
            IScoreHouse sh   = new ScoreHouse();
            IScoreHouse mock = Substitute.For <IScoreHouse>();
            Seed        s    = new Seed();

            mock.AddSeed(s);
            mock.GetCount().Returns(1);
            sh = mock;
            Player p = new Player("Mock Player", sh);

            //ACT
            p.AddSeedToScoreHouse(s);
            //ASSERT
            Assert.AreEqual(1, sh.GetCount(), "There should be one more seed in ScoreHouse");
            sh.Received().AddSeed(s);
            sh.Received().GetCount();
        }
Example #2
0
 public int GetScore()
 {
     return(scoreHouse.GetCount());
 }