Class: Cucumber::Repository
- Inherits:
-
Object
- Object
- Cucumber::Repository
- Defined in:
- lib/cucumber/repository.rb
Overview
In memory repository i.e. a thread based link to cucumber-query
Instance Attribute Summary collapse
-
#attachments_by_test_case_started_id ⇒ Object
readonly
Returns the value of attribute attachments_by_test_case_started_id.
-
#attachments_by_test_run_hook_started_id ⇒ Object
readonly
Returns the value of attribute attachments_by_test_run_hook_started_id.
-
#hook_by_id ⇒ Object
readonly
Returns the value of attribute hook_by_id.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#pickle_by_id ⇒ Object
readonly
Returns the value of attribute pickle_by_id.
-
#pickle_step_by_id ⇒ Object
readonly
Returns the value of attribute pickle_step_by_id.
-
#step_by_id ⇒ Object
readonly
Returns the value of attribute step_by_id.
-
#step_definition_by_id ⇒ Object
readonly
Returns the value of attribute step_definition_by_id.
-
#test_case_by_id ⇒ Object
readonly
Returns the value of attribute test_case_by_id.
-
#test_case_finished_by_test_case_started_id ⇒ Object
readonly
Returns the value of attribute test_case_finished_by_test_case_started_id.
-
#test_case_started_by_id ⇒ Object
readonly
Returns the value of attribute test_case_started_by_id.
-
#test_run_finished ⇒ Object
Returns the value of attribute test_run_finished.
-
#test_run_hook_finished_by_test_run_hook_started_id ⇒ Object
readonly
Returns the value of attribute test_run_hook_finished_by_test_run_hook_started_id.
-
#test_run_hook_started_by_id ⇒ Object
readonly
Returns the value of attribute test_run_hook_started_by_id.
-
#test_run_started ⇒ Object
Returns the value of attribute test_run_started.
-
#test_step_by_id ⇒ Object
readonly
Returns the value of attribute test_step_by_id.
-
#test_steps_finished_by_test_case_started_id ⇒ Object
readonly
Returns the value of attribute test_steps_finished_by_test_case_started_id.
-
#test_steps_started_by_test_case_started_id ⇒ Object
readonly
Returns the value of attribute test_steps_started_by_test_case_started_id.
Instance Method Summary collapse
-
#initialize ⇒ Repository
constructor
TODO: Missing structs (3) final Map<Object, Lineage> lineageById = new HashMap<>(); final Map<String, List<Suggestion>> suggestionsByPickleStepId = new LinkedHashMap<>(); final List<UndefinedParameterType> undefinedParameterTypes = new ArrayList<>();.
- #update(envelope) ⇒ Object
Constructor Details
#initialize ⇒ Repository
TODO: Missing structs (3)
final Map<Object, Lineage> lineageById = new HashMap<>();
final Map<String, List<Suggestion>> suggestionsByPickleStepId = new LinkedHashMap<>();
final List<UndefinedParameterType> undefinedParameterTypes = new ArrayList<>();
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cucumber/repository.rb', line 20 def initialize = Hash.new { |hash, key| hash[key] = [] } = Hash.new { |hash, key| hash[key] = [] } @hook_by_id = {} @pickle_by_id = {} @pickle_step_by_id = {} @step_by_id = {} @step_definition_by_id = {} @test_case_by_id = {} @test_case_started_by_id = {} @test_case_finished_by_test_case_started_id = {} @test_run_hook_started_by_id = {} @test_run_hook_finished_by_test_run_hook_started_id = {} @test_step_by_id = {} @test_steps_started_by_test_case_started_id = Hash.new { |hash, key| hash[key] = [] } @test_steps_finished_by_test_case_started_id = Hash.new { |hash, key| hash[key] = [] } end |
Instance Attribute Details
#attachments_by_test_case_started_id ⇒ Object (readonly)
Returns the value of attribute attachments_by_test_case_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def end |
#attachments_by_test_run_hook_started_id ⇒ Object (readonly)
Returns the value of attribute attachments_by_test_run_hook_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def end |
#hook_by_id ⇒ Object (readonly)
Returns the value of attribute hook_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def hook_by_id @hook_by_id end |
#meta ⇒ Object
Returns the value of attribute meta.
6 7 8 |
# File 'lib/cucumber/repository.rb', line 6 def end |
#pickle_by_id ⇒ Object (readonly)
Returns the value of attribute pickle_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def pickle_by_id @pickle_by_id end |
#pickle_step_by_id ⇒ Object (readonly)
Returns the value of attribute pickle_step_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def pickle_step_by_id @pickle_step_by_id end |
#step_by_id ⇒ Object (readonly)
Returns the value of attribute step_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def step_by_id @step_by_id end |
#step_definition_by_id ⇒ Object (readonly)
Returns the value of attribute step_definition_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def step_definition_by_id @step_definition_by_id end |
#test_case_by_id ⇒ Object (readonly)
Returns the value of attribute test_case_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_case_by_id @test_case_by_id end |
#test_case_finished_by_test_case_started_id ⇒ Object (readonly)
Returns the value of attribute test_case_finished_by_test_case_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_case_finished_by_test_case_started_id @test_case_finished_by_test_case_started_id end |
#test_case_started_by_id ⇒ Object (readonly)
Returns the value of attribute test_case_started_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_case_started_by_id @test_case_started_by_id end |
#test_run_finished ⇒ Object
Returns the value of attribute test_run_finished.
6 7 8 |
# File 'lib/cucumber/repository.rb', line 6 def test_run_finished @test_run_finished end |
#test_run_hook_finished_by_test_run_hook_started_id ⇒ Object (readonly)
Returns the value of attribute test_run_hook_finished_by_test_run_hook_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_run_hook_finished_by_test_run_hook_started_id @test_run_hook_finished_by_test_run_hook_started_id end |
#test_run_hook_started_by_id ⇒ Object (readonly)
Returns the value of attribute test_run_hook_started_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_run_hook_started_by_id @test_run_hook_started_by_id end |
#test_run_started ⇒ Object
Returns the value of attribute test_run_started.
6 7 8 |
# File 'lib/cucumber/repository.rb', line 6 def test_run_started @test_run_started end |
#test_step_by_id ⇒ Object (readonly)
Returns the value of attribute test_step_by_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_step_by_id @test_step_by_id end |
#test_steps_finished_by_test_case_started_id ⇒ Object (readonly)
Returns the value of attribute test_steps_finished_by_test_case_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_steps_finished_by_test_case_started_id @test_steps_finished_by_test_case_started_id end |
#test_steps_started_by_test_case_started_id ⇒ Object (readonly)
Returns the value of attribute test_steps_started_by_test_case_started_id.
7 8 9 |
# File 'lib/cucumber/repository.rb', line 7 def test_steps_started_by_test_case_started_id @test_steps_started_by_test_case_started_id end |
Instance Method Details
#update(envelope) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cucumber/repository.rb', line 38 def update(envelope) return self. = envelope. if envelope. return self.test_run_started = envelope.test_run_started if envelope.test_run_started return self.test_run_finished = envelope.test_run_finished if envelope.test_run_finished return (envelope.) if envelope. return update_gherkin_document(envelope.gherkin_document) if envelope.gherkin_document return update_hook(envelope.hook) if envelope.hook return update_pickle(envelope.pickle) if envelope.pickle return update_step_definition(envelope.step_definition) if envelope.step_definition return update_test_run_hook_started(envelope.test_run_hook_started) if envelope.test_run_hook_started return update_test_run_hook_finished(envelope.test_run_hook_finished) if envelope.test_run_hook_finished return update_test_case_started(envelope.test_case_started) if envelope.test_case_started return update_test_case_finished(envelope.test_case_finished) if envelope.test_case_finished return update_test_step_started(envelope.test_step_started) if envelope.test_step_started return update_test_step_finished(envelope.test_step_finished) if envelope.test_step_finished return update_test_case(envelope.test_case) if envelope.test_case nil end |