<commit_before>package hmda.validation.engine.lar.syntactical

import hmda.parser.fi.lar.LarGenerators
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatest.prop.PropertyChecks

class LarSyntacticalEngineSpec
    extends PropSpec
    with PropertyChecks
    with MustMatchers
    with LarGenerators
    with LarSyntacticalEngine {

  property("A LAR must pass syntactical checks") {
    forAll(larGen) { lar =>
      whenever(lar.id == 2) {
        checkSyntactical(lar).isSuccess mustBe true
      }
    }
  }

}<commit_msg>Add test for checkSyntacticalCollection<commit_after>package hmda.validation.engine.lar.syntactical

import hmda.parser.fi.lar.LarGenerators
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatest.prop.PropertyChecks

class LarSyntacticalEngineSpec
    extends PropSpec
    with PropertyChecks
    with MustMatchers
    with LarGenerators
    with LarSyntacticalEngine {

  property("A LAR must pass syntactical checks") {
    forAll(larGen) { lar =>
      whenever(lar.id == 2) {
        checkSyntactical(lar).isSuccess mustBe true
      }
    }
  }

  property("Pass syntactical checks on groups of LARs") {
    forAll(larListGen) { lars =>
      checkSyntacticalCollection(lars).isSuccess mustBe true
    }
  }

}
{'fraction_non_alphanumeric': 0.07959022852639874, 'fraction_numerical': 0.0015760441292356187, 'mean_word_length': 3.652014652014652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2149247', 'n_tokens_mistral': 421, 'n_tokens_neox': 414, 'n_words': 85}