示例#1
0
        public void CountNinePointsTesting()
        {
            // Arrange
            Dictionary <string, List <string> > hand = new Dictionary <string, List <string> >();

            hand.Add("Hearts", new List <string>()
            {
                "ACE", "ACE", "TEN", "QUEEN", "NINE"
            });
            hand.Add("Clubs", new List <string>()
            {
                "ACE", "ACE", "TEN"
            });
            hand.Add("Diamonds", new List <string>()
            {
                "QUEEN", "JACK"
            });
            hand.Add("Spades", new List <string>()
            {
                "ACE", "TEN"
            });
            string trump    = "Hearts";
            int    expected = 1;

            // Act
            int actual = Points.CalculateMeld(hand, trump);

            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void CountDoubleKingsRoundPointsTesting()
        {
            // Arrange
            Dictionary <string, List <string> > hand = new Dictionary <string, List <string> >();

            hand.Add("Hearts", new List <string>()
            {
                "ACE", "ACE", "TEN", "TEN", "KING", "KING"
            });
            hand.Add("Clubs", new List <string>()
            {
                "KING", "KING"
            });
            hand.Add("Diamonds", new List <string>()
            {
                "KING", "KING"
            });
            hand.Add("Spades", new List <string>()
            {
                "KING", "KING"
            });
            string trump    = "Hearts";
            int    expected = 80;

            // Act
            int actual = Points.CalculateMeld(hand, trump);

            // Assert
            Assert.AreEqual(expected, actual);
        }