|
| 1 | +(ns twelve-days-test |
| 2 | + (:require [clojure.test :refer [deftest testing is]] |
| 3 | + twelve-days)) |
| 4 | + |
| 5 | +(deftest recite_test_1 |
| 6 | + (testing "verse - first day a partridge in a pear tree" |
| 7 | + (is (= (twelve-days/recite 1 1) |
| 8 | + [ |
| 9 | + "On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree." |
| 10 | + ])))) |
| 11 | + |
| 12 | +(deftest recite_test_2 |
| 13 | + (testing "verse - second day two turtle doves" |
| 14 | + (is (= (twelve-days/recite 2 2) |
| 15 | + [ |
| 16 | + "On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree." |
| 17 | + ])))) |
| 18 | + |
| 19 | +(deftest recite_test_3 |
| 20 | + (testing "verse - third day three french hens" |
| 21 | + (is (= (twelve-days/recite 3 3) |
| 22 | + [ |
| 23 | + "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." |
| 24 | + ])))) |
| 25 | + |
| 26 | +(deftest recite_test_4 |
| 27 | + (testing "verse - fourth day four calling birds" |
| 28 | + (is (= (twelve-days/recite 4 4) |
| 29 | + [ |
| 30 | + "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." |
| 31 | + ])))) |
| 32 | + |
| 33 | +(deftest recite_test_5 |
| 34 | + (testing "verse - fifth day five gold rings" |
| 35 | + (is (= (twelve-days/recite 5 5) |
| 36 | + [ |
| 37 | + "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." |
| 38 | + ])))) |
| 39 | + |
| 40 | +(deftest recite_test_6 |
| 41 | + (testing "verse - sixth day six geese-a-laying" |
| 42 | + (is (= (twelve-days/recite 6 6) |
| 43 | + [ |
| 44 | + "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." |
| 45 | + ])))) |
| 46 | + |
| 47 | +(deftest recite_test_7 |
| 48 | + (testing "verse - seventh day seven swans-a-swimming" |
| 49 | + (is (= (twelve-days/recite 7 7) |
| 50 | + [ |
| 51 | + "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." |
| 52 | + ])))) |
| 53 | + |
| 54 | +(deftest recite_test_8 |
| 55 | + (testing "verse - eighth day eight maids-a-milking" |
| 56 | + (is (= (twelve-days/recite 8 8) |
| 57 | + [ |
| 58 | + "On the eighth day of Christmas my true love gave to me: 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." |
| 59 | + ])))) |
| 60 | + |
| 61 | +(deftest recite_test_9 |
| 62 | + (testing "verse - ninth day nine ladies dancing" |
| 63 | + (is (= (twelve-days/recite 9 9) |
| 64 | + [ |
| 65 | + "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." |
| 66 | + ])))) |
| 67 | + |
| 68 | +(deftest recite_test_10 |
| 69 | + (testing "verse - tenth day ten lords-a-leaping" |
| 70 | + (is (= (twelve-days/recite 10 10) |
| 71 | + [ |
| 72 | + "On the tenth day of Christmas my true love gave to me: 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." |
| 73 | + ])))) |
| 74 | + |
| 75 | +(deftest recite_test_11 |
| 76 | + (testing "verse - eleventh day eleven pipers piping" |
| 77 | + (is (= (twelve-days/recite 11 11) |
| 78 | + [ |
| 79 | + "On the eleventh day of Christmas my true love gave to me: 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." |
| 80 | + ])))) |
| 81 | + |
| 82 | +(deftest recite_test_12 |
| 83 | + (testing "verse - twelfth day twelve drummers drumming" |
| 84 | + (is (= (twelve-days/recite 12 12) |
| 85 | + [ |
| 86 | + "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." |
| 87 | + ])))) |
| 88 | + |
| 89 | +(deftest recite_test_13 |
| 90 | + (testing "lyrics - recites first three verses of the song" |
| 91 | + (is (= (twelve-days/recite 1 3) |
| 92 | + [ |
| 93 | + "On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree." |
| 94 | + "On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree." |
| 95 | + "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." |
| 96 | + ])))) |
| 97 | + |
| 98 | +(deftest recite_test_14 |
| 99 | + (testing "lyrics - recites three verses from the middle of the song" |
| 100 | + (is (= (twelve-days/recite 4 6) |
| 101 | + [ |
| 102 | + "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." |
| 103 | + "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." |
| 104 | + "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." |
| 105 | + ])))) |
| 106 | + |
| 107 | +(deftest recite_test_15 |
| 108 | + (testing "lyrics - recites the whole song" |
| 109 | + (is (= (twelve-days/recite 1 12) |
| 110 | + [ |
| 111 | + "On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree." |
| 112 | + "On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree." |
| 113 | + "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." |
| 114 | + "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." |
| 115 | + "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." |
| 116 | + "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." |
| 117 | + "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." |
| 118 | + "On the eighth day of Christmas my true love gave to me: 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." |
| 119 | + "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." |
| 120 | + "On the tenth day of Christmas my true love gave to me: 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." |
| 121 | + "On the eleventh day of Christmas my true love gave to me: 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." |
| 122 | + "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." |
| 123 | + ])))) |
0 commit comments