require 'test/unit'
require_relative '../lib/validate'
require_relative 'fake_db'

class ValidateAbortTest < Test::Unit::TestCase
  def sample_data
    []
  end

  def run_validation(rows, adjustments_for_period_id = 286)
    Validate.run(adjustments_for_period_id, File.basename('fake.file'), rows, FakeDB.new)
  end

  def test_only_invalid_rows_should_be_invalid
    rows = sample_data

    run_validation(rows)

    assert false, "This should not run. The invalid accounting period should abort the test."
  end
end

