Exemplo n.º 1
0
        public void TestGameRestartWithoutPenalty()
        {
            var tpvm = new TriPeaksViewModel();

            tpvm.StartGame(false);
            tpvm.Endgame();
            int oldScore = tpvm.Score;

            Assert.True(tpvm.GameInProgress);
            tpvm.StartGame(false);
            Assert.Equal(oldScore, tpvm.Score);
        }
Exemplo n.º 2
0
        public void TestNewGameStart()
        {
            var tpvm = new TriPeaksViewModel();

            tpvm.StartGame(false);
            Assert.True(tpvm.GameInProgress);
            Assert.Equal(0, tpvm.Streak);
            Assert.Equal(0, tpvm.StreakWins);
            Assert.Equal(string.Empty, tpvm.AdditionalString);
            //Assert.NotNull(tpvm.CardManager);
        }
Exemplo n.º 3
0
        public void TestGameRestartWithPenalty()
        {
            var tpvm = new TriPeaksViewModel();

            tpvm.StartGame(false);
            tpvm.ReachedPeak(1);
            int oldScore = tpvm.Score;

            tpvm.Reset();
            Assert.Equal(oldScore - 140, tpvm.Score);
            Assert.Equal(string.Empty, tpvm.AdditionalString);
        }