aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test/scala
diff options
context:
space:
mode:
authorEllen Spertus <ellen.spertus@gmail.com>2018-08-20 14:06:19 -0700
committerEllen Spertus <ellen.spertus@gmail.com>2018-08-20 14:06:19 -0700
commit03663873fbc556f670cc695f90a2b74bd2bc72de (patch)
tree58f4942ddd032989fd962f40fbf77377b30bb600 /scalding/src/test/scala
parent69b187ba2803988e38cbf813493788dd8731c52d (diff)
downloadsandcrawler-03663873fbc556f670cc695f90a2b74bd2bc72de.tar.gz
sandcrawler-03663873fbc556f670cc695f90a2b74bd2bc72de.zip
Created static factory method for ScorableCreations to deal with null.
Diffstat (limited to 'scalding/src/test/scala')
-rw-r--r--scalding/src/test/scala/sandcrawler/ScorableFeaturesTest.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/scalding/src/test/scala/sandcrawler/ScorableFeaturesTest.scala b/scalding/src/test/scala/sandcrawler/ScorableFeaturesTest.scala
index 80d92aa..8a293fe 100644
--- a/scalding/src/test/scala/sandcrawler/ScorableFeaturesTest.scala
+++ b/scalding/src/test/scala/sandcrawler/ScorableFeaturesTest.scala
@@ -5,12 +5,12 @@ import org.scalatest._
// scalastyle:off null
class ScorableFeaturesTest extends FlatSpec with Matchers {
private def titleToSlug(s : String) : String = {
- new ScorableFeatures(title = s).toSlug
+ ScorableFeatures.create(title = s).toSlug
}
"toMapFeatures()" should "work with gnarly inputs" in {
- new ScorableFeatures(title = null).toMapFeatures
- new ScorableFeatures(title = "something", doi = null, sha1 = null, year = 123).toMapFeatures
+ ScorableFeatures.create(title = null).toMapFeatures
+ ScorableFeatures.create(title = "something", doi = null, sha1 = null, year = 123).toMapFeatures
}
"mapToSlug()" should "extract the parts of titles before a colon" in {