summaryrefslogtreecommitdiff
path: root/core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala')
-rwxr-xr-xcore/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala31
1 files changed, 31 insertions, 0 deletions
diff --git a/core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala b/core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala
new file mode 100755
index 0000000..132156b
--- /dev/null
+++ b/core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala
@@ -0,0 +1,31 @@
+package com.rockymadden.stringmetric.filter
+
+import com.rockymadden.stringmetric.ScalaTest
+import org.junit.runner.RunWith
+import org.scalatest.junit.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+final class StringFilterDelegateSpec extends ScalaTest {
+ import StringFilterDelegateSpec.Filter
+
+ "StringFilter" should provide {
+ "overloaded filter method" when passed {
+ "String" should returns {
+ "the same String" in {
+ Filter.filter("Hello World") should equal ("Hello World")
+ Filter.filter(" Hello! World]") should equal (" Hello! World]")
+ }
+ }
+ "character array" should returns {
+ "the same character array" in {
+ Filter.filter("Hello World".toCharArray) should equal ("Hello World".toCharArray)
+ Filter.filter(" Hello! World]".toCharArray) should equal (" Hello! World]".toCharArray)
+ }
+ }
+ }
+ }
+}
+
+object StringFilterDelegateSpec {
+ private final val Filter = new StringFilterDelegate
+}