Class: Sapphire::DSL::FieldNotFoundEvaluation

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/DSL/Evaluations/FieldNotFoundEvaluation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field, page, message) ⇒ FieldNotFoundEvaluation

Returns a new instance of FieldNotFoundEvaluation.



7
8
9
10
11
# File 'lib/sapphire/DSL/Evaluations/FieldNotFoundEvaluation.rb', line 7

def initialize(field, page, message)
  @field = field
  @page = page
  @message = message
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



5
6
7
# File 'lib/sapphire/DSL/Evaluations/FieldNotFoundEvaluation.rb', line 5

def field
  @field
end

Instance Method Details

#OutputObject

Raises:

  • (ExpectationException)


13
14
15
16
17
18
19
20
# File 'lib/sapphire/DSL/Evaluations/FieldNotFoundEvaluation.rb', line 13

def Output()
    messages = []

    messages << "Cannot find control matching " + @field.to_s + " for page " + @page.to_s
    messages << "Reason: " + @message

    raise ExpectationException.new(messages)
end