1
exercism fetch scala kindergarten-garden

src/test/scala/GardenTest.scala

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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import org.scalatest.{Matchers, FunSuite}

/** @version 1.0.0 */
class KindergartenGardenTest extends FunSuite with Matchers {

  test("partial garden - garden with single student") {
    Garden.defaultGarden("RC\nGG").plants("Alice") should be(
      List(Plant.Radishes, Plant.Clover, Plant.Grass, Plant.Grass))
  }

  test("partial garden - different garden with single student") {
    pending
    Garden.defaultGarden("VC\nRC").plants("Alice") should be(
      List(Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Clover))
  }

  test("partial garden - garden with two students") {
    pending
    Garden.defaultGarden("VVCG\nVVRC").plants("Bob") should be(
      List(Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Clover))
  }

  test(
    "multiple students for the same garden with three students, partial garden - second student's garden") {
    pending
    Garden.defaultGarden("VVCCGG\nVVCCGG").plants("Bob") should be(
      List(Plant.Clover, Plant.Clover, Plant.Clover, Plant.Clover))
  }

  test(
    "multiple students for the same garden with three students, partial garden - third student's garden") {
    pending
    Garden.defaultGarden("VVCCGG\nVVCCGG").plants("Charlie") should be(
      List(Plant.Grass, Plant.Grass, Plant.Grass, Plant.Grass))
  }

  test("full garden - first student's garden") {
    pending
    Garden
      .defaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV")
      .plants("Alice") should be(
      List(Plant.Violets, Plant.Radishes, Plant.Violets, Plant.Radishes))
  }

  test("full garden - second student's garden") {
    pending
    Garden
      .defaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV")
      .plants("Bob") should be(
      List(Plant.Clover, Plant.Grass, Plant.Clover, Plant.Clover))
  }

  test("full garden - second to last student's garden") {
    pending
    Garden
      .defaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV")
      .plants("Kincaid") should be(
      List(Plant.Grass, Plant.Clover, Plant.Clover, Plant.Grass))
  }

  test("full garden - last student's garden") {
    pending
    Garden
      .defaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV")
      .plants("Larry") should be(
      List(Plant.Grass, Plant.Violets, Plant.Clover, Plant.Violets))
  }

  test("non-alphabetical student list - first student's garden") {
    pending
    Garden(List("Samantha", "Patricia", "Xander", "Roger"),
           "VCRRGVRG\nRVGCCGCV").plants("Patricia") should be(
      List(Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Violets))
  }

  test("non-alphabetical student list - second student's garden") {
    pending
    Garden(List("Samantha", "Patricia", "Xander", "Roger"),
           "VCRRGVRG\nRVGCCGCV").plants("Roger") should be(
      List(Plant.Radishes, Plant.Radishes, Plant.Grass, Plant.Clover))
  }

  test("non-alphabetical student list - third student's garden") {
    pending
    Garden(List("Samantha", "Patricia", "Xander", "Roger"),
           "VCRRGVRG\nRVGCCGCV").plants("Samantha") should be(
      List(Plant.Grass, Plant.Violets, Plant.Clover, Plant.Grass))
  }

  test("non-alphabetical student list - fourth (last) student's garden") {
    pending
    Garden(List("Samantha", "Patricia", "Xander", "Roger"),
           "VCRRGVRG\nRVGCCGCV").plants("Xander") should be(
      List(Plant.Radishes, Plant.Grass, Plant.Clover, Plant.Violets))
  }
}