Skip to content

Commit

Permalink
Some slight test improvements for issues #60 & # 59.
Browse files Browse the repository at this point in the history
  • Loading branch information
greebie committed Oct 18, 2017
1 parent e0acecf commit f6c5210
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package io.archivesunleashed.spark.matchbox
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import java.io.IOException

@RunWith(classOf[JUnitRunner])
class RemoveHTMLTest extends FunSuite {
Expand All @@ -35,5 +36,7 @@ class RemoveHTMLTest extends FunSuite {
"""
val removed = RemoveHTML(html)
assert(removed == "Here is some... HTML")
val caught = intercept[IOException] {RemoveHTML (null)}
assert (caught.getMessage == "Caught exception processing input row ")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import shapeless._
import ops.tuple.FlatMapper
import ops.tuple.ToList
import syntax.std.tuple._
import org.scalatest.Matchers._

@RunWith(classOf[JUnitRunner])
class TupleFormatterTest extends FunSuite {
Expand All @@ -36,4 +37,9 @@ class TupleFormatterTest extends FunSuite {
assert(TupleFormatter.flatten(tuple) == ("a", 1, "c", "x", 3, "NO", "YES", "perhaps", "maybe", 3, 0, 1))
assert(TupleFormatter.flatten.isInstanceOf[TupleFormatter.LowPriorityFlatten])
}

test ("Object extensions") {
TupleFormatter.flatten shouldBe a [TupleFormatter.LowPriorityFlatten]
TupleFormatter.tabDelimit shouldBe a [Poly1]
}
}

0 comments on commit f6c5210

Please sign in to comment.