Skip to content

Commit

Permalink
Firsts automated test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvrpl committed Mar 27, 2017
1 parent de8f826 commit c38bc8c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/test/scala/BigShipperTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import org.scalatest.FunSuite
import com.holdenkarau.spark.testing.SharedSparkContext

class BigShipperTests extends FunSuite with SharedSparkContext{
test("First test") {
assert(1 == 1)
import org.apache.spark.sql.types._
System.setProperty("loglevel", "ERROR")
test("Checked utils.makeSchema") {
val loader = new Loader(sc)
val expected = new StructType(Array(StructField("field1",IntegerType,true), StructField("field2",StringType,true), StructField("field3",BooleanType,true), StructField("field4",TimestampType,true), StructField("field5",FloatType,true)))
val result = loader.utils.makeSchema("field1:int,field2:string,field3:boolean,field4:date,field5:float")
assert(result == expected)
}
}

0 comments on commit c38bc8c

Please sign in to comment.