aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test/scala
diff options
context:
space:
mode:
authorEllen Spertus <ellen.spertus@gmail.com>2018-07-25 10:46:04 -0700
committerEllen Spertus <ellen.spertus@gmail.com>2018-07-25 10:46:04 -0700
commit4c5dbdf964da9ca29246b0f8eadec6daae1d3ffb (patch)
tree016edba956ee1af0af2a249225db78df843ad8d0 /scalding/src/test/scala
parenta950d5d5c61fb77b2ba83703ef853ef951ac94af (diff)
downloadsandcrawler-4c5dbdf964da9ca29246b0f8eadec6daae1d3ffb.tar.gz
sandcrawler-4c5dbdf964da9ca29246b0f8eadec6daae1d3ffb.zip
Figured out string conversion. Tests pass. Still WIP.
Diffstat (limited to 'scalding/src/test/scala')
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala b/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala
index f52c5b4..0d681b9 100644
--- a/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala
+++ b/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala
@@ -178,10 +178,14 @@ class HBaseCrossrefScoreTest extends FunSpec with TupleConversions {
.source(TextLine(input), List((
"0" -> CrossrefString.replace("<<TITLE>>", "Title 1: TNG").replace("<<DOI>>", "DOI-0"),
"1" -> CrossrefString.replace("<<TITLE>>", "Title 2: Rebooted").replace("<<DOI>>", "DOI-1"))))
- .sink[Tuple](TypedTsv[(String, String, String)](output)) {
+ .sink[(String, String, String)](TypedTsv[(String, String, String)](output)) {
outputBuffer =>
- it("should return a 2-element list.") {
- assert(outputBuffer.size === 2)
+ it("should return a 4-element list.") {
+ assert(outputBuffer.size === 4)
+ }
+ it("should return the right slugs.") {
+ val (sha1, json, slug) = outputBuffer(0)
+ assert(slug == "title1")
}
}
.run