Exemple #1
0
        public void FizBuzzScorer_Score_OneCustomScoringRule_NumberIsMultiple_ReturnsCustomScore()
        {
            const string customScore     = "fuzz";
            var          scoringSettings = new ScoringSettings();

            scoringSettings.AddRule(2, customScore);

            TestFizzBuzzScorerScoring(2, customScore, scoringSettings);
            TestFizzBuzzScorerScoring(16, customScore, scoringSettings);
        }
Exemple #2
0
        public void FizBuzzScorer_Score_ManyCustomScoringRules_NumberIsMultipleOf1Custom_ReturnsCustomScore()
        {
            var scoringSettings = new ScoringSettings();

            scoringSettings
            .AddRule(13, "pep")
            .AddRule(2, "fuzz")
            .AddRule(9, "bizz");

            TestFizzBuzzScorerScoring(13, "pep", scoringSettings);
        }
Exemple #3
0
        public void FizBuzzScorer_Score_ManyCustomScoringRules_NumberIsNotMultiple_ReturnsNormalNumber()
        {
            var scoringSettings = new ScoringSettings();

            scoringSettings
            .AddRule(2, "fuzz")
            .AddRule(9, "bizz")
            .AddRule(13, "pep");

            TestFizzBuzzScorerScoring(231, "231", scoringSettings);
        }