<commit_before><commit_msg>Unittests for writing surface series.<commit_after>package co.theasi.plotly.writer

import org.scalatest._

import org.json4s._

import co.theasi.plotly.SurfaceOptions

class SeriesWriterSpec extends FlatSpec with Matchers {

  "toJson" should "serialize the srcs and scenes for surfaces" in {
    val srcs = List("src1")
    val sceneIndex = 2
    val options = SurfaceOptions()
    val writeInfo = SurfaceWriteInfo(srcs, sceneIndex, options)

    val jobj = SeriesWriter.toJson(writeInfo)
    (jobj \ "zsrc") shouldEqual JString("src1")
    (jobj \ "scene") shouldEqual JString("scene2")
  }

}
{'fraction_non_alphanumeric': 0.09791332263242375, 'fraction_numerical': 0.008025682182985553, 'mean_word_length': 4.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6270860', 'n_tokens_mistral': 201, 'n_tokens_neox': 194, 'n_words': 53}