Exemple #1
0
        public void TestParseOneCard()
        {
            Assert.AreEqual(Room.BilliardsRoom, EnumConversion.ParseOneCard("Bi"));
            Assert.AreEqual(Room.BallRoom, EnumConversion.ParseOneCard("Ba"));

            Assert.AreEqual(Suspect.MrsWhite, EnumConversion.ParseOneCard("Wh"));

            Assert.AreEqual(Weapon.MonkeyWrench, EnumConversion.ParseOneCard("Wr"));

            Assert.Throws <ArgumentException>(() => EnumConversion.ParseOneCard("Jw"));
        }
Exemple #2
0
        public static Card ParseCard(string s)
        {
            var o = EnumConversion.ParseOneCard(s);

            return(new Card(o));
        }