public void Twelfth_day_twelve_drummers_drumming()
    {
        var expected = "On the twelfth day of Christmas my true love gave to me: twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(12));
    }
Esempio n. 2
0
    public void Second_day_two_turtle_doves()
    {
        var expected = "On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(2));
    }
    public void Seventh_day_seven_swans_a_swimming()
    {
        var expected = "On the seventh day of Christmas my true love gave to me: seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(7));
    }
    public void Ninth_day_nine_ladies_dancing()
    {
        var expected = "On the ninth day of Christmas my true love gave to me: nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(9));
    }
    public void Sixth_day_six_geese_a_laying()
    {
        var expected = "On the sixth day of Christmas my true love gave to me: six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(6));
    }
    public void First_day_a_partridge_in_a_pear_tree()
    {
        var expected = "On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(1));
    }
    public void Fifth_day_five_gold_rings()
    {
        var expected = "On the fifth day of Christmas my true love gave to me: five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(5));
    }
    public void Fourth_day_four_calling_birds()
    {
        var expected = "On the fourth day of Christmas my true love gave to me: four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(4));
    }
    public void Third_day_three_french_hens()
    {
        var expected = "On the third day of Christmas my true love gave to me: three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.";

        Assert.Equal(expected, TwelveDays.Recite(3));
    }
Esempio n. 10
0
    public static string Recite(int startVerse, int endVerse)
    {
        var text = Enumerable.Range(startVerse, endVerse - startVerse + 1).Select(e => TwelveDays.Recite(e));

        return(string.Join("\n", text));
    }
Esempio n. 11
0
        static void Main(string[] args)
        {
            var twelve = TwelveDays.Recite(4, 6);

            Console.WriteLine(twelve);
        }