Ejemplo n.º 1
0
 public void TestFaceDownCardsDoesntIncludeRankOrSuitWhenConvertingToJson()
 {
     CardViewModel card = new CardViewModel(new Card(Rank.Ace, Suit.Hearts) { IsFaceUp = false });
     Assert.AreEqual("{\"isFaceUp\":false}", card.ToJson());
 }
Ejemplo n.º 2
0
 public void TestCardConvertsToJson()
 {
     CardViewModel card = new CardViewModel(new Card(Rank.Ace, Suit.Hearts));
     Assert.AreEqual("{\"rank\":\"A\",\"suit\":\"H\",\"isFaceUp\":true}", card.ToJson());
 }