diff options
author | Rocky Madden <git@rockymadden.com> | 2013-05-20 16:30:52 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-05-20 16:30:52 -0600 |
commit | c0de09e838282fa708125570971bdca15f905d06 (patch) | |
tree | 217c55b47b7baf3d6f8e134ba86bd59571550182 /stringmetric-core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala | |
parent | 6c8a9f1ca60822ca2ee1839bca2cd00afea7037f (diff) | |
download | stringmetric-c0de09e838282fa708125570971bdca15f905d06.tar.gz stringmetric-c0de09e838282fa708125570971bdca15f905d06.tar.bz2 stringmetric-c0de09e838282fa708125570971bdca15f905d06.zip |
Changed subproject folder naming. Updated Scala to 2.10.1.
Diffstat (limited to 'stringmetric-core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala')
-rwxr-xr-x | stringmetric-core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/stringmetric-core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala b/stringmetric-core/source/test/scala/com/rockymadden/stringmetric/filter/StringFilterDelegateSpec.scala new file mode 100755 index 0000000..132156b --- /dev/null +++ b/stringmetric-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 +} |