Exemple #1
0
    public void NoCardsTest()
    {
        var objectUnderTest = new PointsCalculator();
        var result          = objectUnderTest.GetPoints(Enumerable.Empty <Card>().ToList());

        Assert.True(result == 0);
    }
Exemple #2
0
    public void StandardDeckTest()
    {
        var objectUnderTest = new PointsCalculator();
        var entireDeck      = new StandardDeck();
        var result          = objectUnderTest.GetPoints(entireDeck.Cards.Cards);

        Assert.True(result == 96);
    }
Exemple #3
0
    public void SingleCardTest()
    {
        var objectUnderTest = new PointsCalculator();
        var result          = objectUnderTest.GetPoints(new List <Card> {
            new Card {
                Rank = "2", Suit = Constants.Suits.Clubs
            }
        });

        Assert.True(result == 1);
    }
Exemple #4
0
    public void TwoCardsWithABonusCardTest()
    {
        var objectUnderTest = new PointsCalculator();
        var result          = objectUnderTest.GetPoints(new List <Card> {
            new Card {
                Rank = "2", Suit = Constants.Suits.Clubs
            },
            new Card {
                Rank = "J", Suit = Constants.Suits.Clubs
            }
        });

        Assert.True(result == 3);
    }