Sha256: 91f905e5b5347f92365bd5be00547bb4fa7cdbf16d7398ef82124167a9a2b37d

Contents?: true

Size: 1.29 KB

Versions: 40

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true
# This class runs a single term scenario and logs the results.
module QaServer
  class TermScenarioValidator < ScenarioValidator
    TERM_ACTION = 'term'

    # @param scenario [TermScenario] the scenario to run
    # @param status_log [ScenarioLogger] logger for recording test results
    # @param validation_type [Symbol] the type of scenarios to run (e.g. VALIDATE_CONNECTION, VALIDATE_ACCURACY, ALL_VALIDATIONS)
    def initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE)
      super
    end

    # Run a term scenario and log results.
    def run_connection_scenario
      test_connection(min_expected_size: scenario.min_result_size, scenario_type_name: 'term') do
        authority.find(scenario.identifier,
                       subauth: scenario.subauthority_name)
      end
    end

    # Run a term scenario and log results.
    def run_accuracy_scenario
      # no accuracy scenarios defined for terms at this time
    end

    private

      def action
        TERM_ACTION
      end

      def accuracy_scenario?
        # At this time, all scenarios are connection scenarios for terms.
        false
      end

      def connection_scenario?
        # At this time, all scenarios are connection scenarios for terms.
        true
      end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
qa_server-5.0.2 app/validators/qa_server/term_scenario_validator.rb
qa_server-5.0.1 app/validators/qa_server/term_scenario_validator.rb
qa_server-5.0.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-4.0.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-3.0.3 app/validators/qa_server/term_scenario_validator.rb
qa_server-3.0.2 app/validators/qa_server/term_scenario_validator.rb
qa_server-3.0.1 app/validators/qa_server/term_scenario_validator.rb
qa_server-3.0.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.2.3 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.2.2 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.2.1 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.2.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.1.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-2.0.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.2.3 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.2.2 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.2.1 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.2.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.1.0 app/validators/qa_server/term_scenario_validator.rb
qa_server-1.0.0 app/validators/qa_server/term_scenario_validator.rb