-
Notifications
You must be signed in to change notification settings - Fork 0
/
fun_fact_test.go
61 lines (56 loc) · 3.28 KB
/
fun_fact_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package bird_data_guessing
/*
func TestFunFact_Wikipedia(t *testing.T) {
wikipediaFunFact := func(englishName string) []*inference.String {
return wikipediaRequestForTesting(englishName).propertySearchers().funFact.FunFact(englishName)
}
testSliceStringCases(t, wikipediaFunFact,
unorderedSliceStringCase("Chinstrap penguin", "Chinstrap penguins may be the most abundant penguin, with a population estimated at 7.5 million breeding pairs."),
)
}
/*
func TestEggColor_Wikipedia(t *testing.T) {
wikipediaEggColor := func(latinName string) []*inference.String {
return wikipediaRequestForTesting(latinName).propertySearchers().eggColor.EggColor()
}
testSliceStringCases(t, wikipediaEggColor,
unorderedSliceStringCase("Cardinalis sinuatus", "whitish with specks of green or gray"),
unorderedSliceStringCase("Gracula religiosa"),
unorderedSliceStringCase("Platalea ajaja", "whitish with brown markings"),
unorderedSliceStringCase("Dryobates scalaris", "plain white"),
unorderedSliceStringCase("Grus americana", "olive"),
unorderedSliceStringCase("Ictinia mississippiensis", "white to pale-bluish in color, and are usually about 1"),
unorderedSliceStringCase("Falco mexicanus", "subelliptical and pinkish with brown, reddish-brown, and purplish dots"),
unorderedSliceStringCase("Ectopistes migratorius", "white and oval shaped and averaged 40 by 34 mm (1"),
unorderedSliceStringCase("Leiothlypis virginiae", "white in color and dotted with fine brown speckles"),
unorderedSliceStringCase("Motacilla alba", "cream-coloured, often with a faint bluish-green or turquoise tint, and heavily spotted with reddish brown; they measure, on average, 21 mm × 15 mm (0"),
unorderedSliceStringCase("Numenius americanus", "vary in hue from white to olive"),
)
}
func TestEggColor_WhatBird(t *testing.T) {
whatBirdEggColor := func(englishName string) []*inference.String {
return whatBirdRequestForTesting(englishName).propertySearchers().eggColor.EggColor()
}
testSliceStringCases(t, whatBirdEggColor,
unorderedSliceStringCase("Ancient murrelet", "Light to olive brown, sometimes speckled."),
unorderedSliceStringCase("Anna's Hummingbird", "White"),
unorderedSliceStringCase("Audubon's Oriole", "Pale blue or gray with brown or purple marks"),
unorderedSliceStringCase("Black Rail", "Pale pink to white with brown spots"),
unorderedSliceStringCase("Black-crested titmouse", "White with brown spots"),
unorderedSliceStringCase("Brown booby", "White to pale blue green, nest stained."))
}
func TestEggColor_Audubon(t *testing.T) {
audubonEggColor := func(englishName string) []*inference.String {
return audubonRequestForTesting(englishName).propertySearchers().eggColor.EggColor()
}
testSliceStringCases(t, audubonEggColor,
unorderedSliceStringCase("Great blue heron", "Pale blue"),
unorderedSliceStringCase("Bald eagle", "White"),
unorderedSliceStringCase("Mountain chickadee", "White, dotted with reddish brown, sometimes unmarked"),
unorderedSliceStringCase("Bridled Titmouse", "Unmarked white"),
unorderedSliceStringCase("American Robin", `Pale blue or "robin's-egg blue`),
unorderedSliceStringCase("Boreal chickadee", "White, with fine reddish brown dots often concentrated at larger end"),
unorderedSliceStringCase("Black and white warbler", "Creamy white, flecked with brown at large end"),
)
}
*/