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")); }
public static Card ParseCard(string s) { var o = EnumConversion.ParseOneCard(s); return(new Card(o)); }