本文整理汇总了C#中Poker.Card.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Card.ToString方法的具体用法?C# Card.ToString怎么用?C# Card.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poker.Card
的用法示例。
在下文中一共展示了Card.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestingCardToStringShouldNotReturnEmptyString
public void TestingCardToStringShouldNotReturnEmptyString()
{
var card = new Card(new CardFace(), new CardSuit());
var test = string.Empty;
Assert.AreNotEqual(
test,
card.ToString(),
string.Format("Expected {0} to not equal {1}",
card.ToString(),
test));
}
示例2: TestingCardToStringShouldReturnCorrectString_AceSpades
public void TestingCardToStringShouldReturnCorrectString_AceSpades()
{
var card = new Card(CardFace.Ace, CardSuit.Spades);
var test = "A" + " " + "♠";
Assert.AreEqual(
test,
card.ToString(),
string.Format("The value {0} does not equal the expected {1}",
card.ToString(),
test));
}
示例3: TestingCardToStringShouldReturnCorrectString_SevenHearts
public void TestingCardToStringShouldReturnCorrectString_SevenHearts()
{
var card = new Card(CardFace.Seven, CardSuit.Hearts);
var test = "7" + " " + "♥";
Assert.AreEqual(
test,
card.ToString(),
string.Format("The value {0} does not equal the expected {1}",
card.ToString(),
test));
}
示例4: TestingCardToStringShouldReturnCorrectString_JackDiamond
public void TestingCardToStringShouldReturnCorrectString_JackDiamond()
{
var card = new Card(CardFace.Jack, CardSuit.Diamonds);
var test = "J" + " " + "♦";
Assert.AreEqual(
test,
card.ToString(),
string.Format("The value {0} does not equal the expected {1}",
card.ToString(),
test));
}
示例5: TestToStringQueenOfSpades
public void TestToStringQueenOfSpades()
{
Card card = new Card(CardFace.Queen, CardSuit.Spades);
string result = "Q" + this.spade;
Assert.AreEqual(card.ToString(), result);
}
示例6: TestToStringAceOfClubs
public void TestToStringAceOfClubs()
{
Card card = new Card(CardFace.Ace, CardSuit.Clubs);
string result = "A" + this.club;
Assert.AreEqual(card.ToString(), result);
}
示例7: Card_ToString_ShouldReturnCorrectFace_Jack
public void Card_ToString_ShouldReturnCorrectFace_Jack()
{
Card card = new Card(CardFace.Jack, CardSuit.Clubs);
var cardToString = card.ToString();
var length = cardToString.Length;
Assert.AreEqual("Jack", cardToString.Substring(0, 4));
}
示例8: CardToStringTestTwoOfSpades
public void CardToStringTestTwoOfSpades()
{
Card card = new Card(CardFace.Two, CardSuit.Spades);
string expected = "2♠";
string actual = card.ToString();
Assert.AreEqual(expected, actual);
}
示例9: CardToStringTestNineOfClubs
public void CardToStringTestNineOfClubs()
{
Card card = new Card(CardFace.Nine, CardSuit.Clubs);
string expected = "9♣";
string actual = card.ToString();
Assert.AreEqual(expected, actual);
}
示例10: PokerTestToStringTwoClubs
public void PokerTestToStringTwoClubs()
{
Card myCard = new Card(CardFace.Two, CardSuit.Clubs);
string result = myCard.ToString();
Assert.AreEqual("2♣", result);
}
示例11: ToStringJackOfClubs
public void ToStringJackOfClubs()
{
Card card = new Card(CardFace.Jack, CardSuit.Clubs);
string actual = card.ToString();
string expected = "J♣";
Assert.AreEqual(actual, expected);
}
示例12: ToStringAceOfSpadesTest
public void ToStringAceOfSpadesTest()
{
Card card = new Card(CardFace.Ace, CardSuit.Spades);
string actual = card.ToString();
string expected = "A♠";
Assert.AreEqual(actual, expected);
}
示例13: TestAceHeartToString
public void TestAceHeartToString()
{
Card card = new Card(CardFace.Ace, CardSuit.Hearts);
string expected = "A♥";
string result = card.ToString();
Assert.AreEqual(expected, result);
}
示例14: TestKingDiamondsToString
public void TestKingDiamondsToString()
{
Card card = new Card(CardFace.King, CardSuit.Spades);
string expected = "K♠";
string result = card.ToString();
Assert.AreEqual(expected, result);
}
示例15: TestQueenSpadesToString
public void TestQueenSpadesToString()
{
Card card = new Card(CardFace.Queen, CardSuit.Spades);
string expected = "Q♠";
string result = card.ToString();
Assert.AreEqual(expected, result);
}