Class: ConcordionParseResult
- Inherits:
-
Object
- Object
- ConcordionParseResult
show all
- Includes:
- ConcordionUtility
- Defined in:
- lib/concordion_parse_result.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#concordion_arguments, #concordion_cmd_attr_exists?, #concordion_cmd_attr_for, #concordion_property_reference, #concordion_variable_name, #has_property_reference?, #instrumentation, #supported_and_instrumented?
#methods_for
#attr_writer_method?, #concordion_assignment, #concordion_method_name, #ends_in_empty_parens?, #escape_single_quotes, #has_arguments?, #has_assignment?, #is_direct_method_call?
#singular
#snake_case, #snake_cased_goldmaster_name, #snake_cased_test_name
#concordion_command_attributes, #supported?
Constructor Details
Returns a new instance of ConcordionParseResult.
6
7
8
9
10
11
|
# File 'lib/concordion_parse_result.rb', line 6
def initialize(cmd, sut, content, tag)
@concordion_command = cmd
@system_under_test = sut
@content = content
@tag = tag
end
|
Instance Attribute Details
#concordion_command ⇒ Object
Returns the value of attribute concordion_command.
5
6
7
|
# File 'lib/concordion_parse_result.rb', line 5
def concordion_command
@concordion_command
end
|
#content ⇒ Object
Returns the value of attribute content.
5
6
7
|
# File 'lib/concordion_parse_result.rb', line 5
def content
@content
end
|
#system_under_test ⇒ Object
Returns the value of attribute system_under_test.
5
6
7
|
# File 'lib/concordion_parse_result.rb', line 5
def system_under_test
@system_under_test
end
|
#tag ⇒ Object
Returns the value of attribute tag.
5
6
7
|
# File 'lib/concordion_parse_result.rb', line 5
def tag
@tag
end
|
Instance Method Details
#assignment ⇒ Object
42
43
44
|
# File 'lib/concordion_parse_result.rb', line 42
def assignment
concordion_assignment(@system_under_test)
end
|
#image_location ⇒ Object
37
38
39
40
|
# File 'lib/concordion_parse_result.rb', line 37
def image_location
return nil if @tag.nil?
@tag.get_attribute('src')
end
|
#is_assert_image_command? ⇒ Boolean
16
17
18
|
# File 'lib/concordion_parse_result.rb', line 16
def is_assert_image_command?
"assert_image" == @concordion_command
end
|
#is_assert_true_command? ⇒ Boolean
29
30
31
|
# File 'lib/concordion_parse_result.rb', line 29
def is_assert_true_command?
"asserttrue" == @concordion_command
end
|
#is_execute_command? ⇒ Boolean
26
27
28
|
# File 'lib/concordion_parse_result.rb', line 26
def is_execute_command?
"execute" == @concordion_command
end
|
#is_set_command? ⇒ Boolean
20
21
22
|
# File 'lib/concordion_parse_result.rb', line 20
def is_set_command?
"set" == @concordion_command
end
|
#is_verify_command? ⇒ Boolean
23
24
25
|
# File 'lib/concordion_parse_result.rb', line 23
def is_verify_command?
"verifyrows" == @concordion_command
end
|
#needs_dereference? ⇒ Boolean
46
47
48
|
# File 'lib/concordion_parse_result.rb', line 46
def needs_dereference?
@system_under_test =~ /^#/ && @system_under_test.index("=").nil?
end
|
#num_results_expected ⇒ Object
33
34
35
|
# File 'lib/concordion_parse_result.rb', line 33
def num_results_expected
@tag.search("tr").size - 1
end
|
#to_s ⇒ Object
12
13
14
|
# File 'lib/concordion_parse_result.rb', line 12
def to_s
"Concordion command[#{@concordion_command}], System under test method[#{@system_under_test}], Tag Content[#{@content}] Image Location[#{image_location}]"
end
|