Skip to content

Commit 0896358

Browse files
committed
Move TranslatorTest over to Scalatest
1 parent 3f87234 commit 0896358

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package org.geoscript.geocss
22

3-
import org.specs2._
3+
import org.scalatest._, matchers._
44

5-
class TranslatorTest extends Specification with matcher.DataTables {
5+
class TranslatorTest extends FunSuite with ShouldMatchers {
66
val Translator = new Translator
77
import Translator.color
88

@@ -14,14 +14,10 @@ class TranslatorTest extends Specification with matcher.DataTables {
1414
}
1515
}
1616

17-
def is =
18-
"Short hexcodes and English names should work as colors" ! {
19-
"color" | "hex" |
20-
Literal("#FFAA77") ! "#ffaa77" |
21-
Function("rgb", List("1.0", "0.665", "0.467") map Literal) ! "#ffaa77" |
22-
Literal("#FA7") ! "#ffaa77" |
23-
Function("rgb", List("255", "170", "119") map Literal) ! "#ffaa77" |> {
24-
(property, expected) => body(color(property)) must_== expected
25-
}
26-
}
17+
test("Short hexcodes and English names should work as colors") {
18+
body(color(Literal("#FFAA77"))) should equal("#ffaa77")
19+
body(color(Function("rgb", List("1.0", "0.665", "0.467") map Literal))) should equal("#ffaa77")
20+
body(color(Literal("#FA7"))) should equal("#ffaa77")
21+
body(color(Function("rgb", List("255", "170", "119") map Literal))) should equal("#ffaa77")
22+
}
2723
}

0 commit comments

Comments
 (0)