<commit_before>package hmda.validation.rules.lar.validity

import hmda.parser.fi.lar.LarGenerators
import hmda.validation.dsl.Success
import org.scalacheck.Gen
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatest.prop.PropertyChecks

class V262Spec extends PropSpec with PropertyChecks with MustMatchers with LarGenerators {
  property("If date application received = NA, then action taken type must = 6") {
    forAll(larGen) { lar =>
      whenever(lar.id == 2) {
        val naLoan = lar.loan.copy(applicationDate = "NA")
        val v262Lar = lar.copy(loan = naLoan, actionTakenType = 6)
        V262(v262Lar) mustBe Success()
      }
    }
  }
}<commit_msg>Extend V262 tests<commit_after>package hmda.validation.rules.lar.validity

import hmda.parser.fi.lar.LarGenerators
import hmda.validation.dsl.Success
import org.scalacheck.Gen
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatest.prop.PropertyChecks

class V262Spec extends PropSpec with PropertyChecks with MustMatchers with LarGenerators {
  property("If date application received = NA, then action taken type must = 6") {
    forAll(larGen) { lar =>
      whenever(lar.id == 2) {
        val naLoan = lar.loan.copy(applicationDate = "NA")
        val v262Lar = lar.copy(loan = naLoan, actionTakenType = 6)
        V262(v262Lar) mustBe Success()
      }
    }
  }

  property("If date application received != NA, V262 should pass") {
    forAll(larGen) { lar =>
      whenever(lar.id == 2 && lar.loan.applicationDate != "NA") {
        V262(lar) mustBe Success()
      }
    }
  }
}
{'fraction_non_alphanumeric': 0.10653138871274571, 'fraction_numerical': 0.025364616360177554, 'mean_word_length': 3.5214899713467047, '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': '4267718', 'n_tokens_mistral': 559, 'n_tokens_neox': 511, 'n_words': 123}