package io.spark.ddf


import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.test.TestSQLContext._

/**
  */
class NestedDDFSuite extends ATestSuite {

  test("test JSON with primitiveFieldAndType") {

    val df:DataFrame = jsonRDD(primitiveFieldAndType)

    df.printSchema()
    println("Number of records: " + df.count())

  }

  test("Loading a JSON dataset from a text file") {
    val path = "resources/test/sleep_data_sample.json"
    val df:DataFrame = jsonFile(path)

    println("dataframe created from json file at " + path)
    df.printSchema()
    println("Number of records: " + df.count())

  }

}

package io.spark.ddf


import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.test.TestSQLContext._

/**
  */
class NestedDDFSuite extends ATestSuite {

  /*
  test("test JSON with primitiveFieldAndType") {

    val df:DataFrame = jsonRDD(primitiveFieldAndType)

    df.printSchema()
    println("Number of records: " + df.count())

  }
  */
  test("Loading a JSON dataset from a text file") {
    val path = "resources/test/sleep_data_sample.json"
    val df:DataFrame = jsonFile(path)

    println("dataframe created from json file at " + path)
    df.printSchema()
    println("Number of records: " + df.count())

  }

}

Update test suite to avoid null pointer to SparkContext
Update test suite to avoid null pointer to SparkContext
