Class: VertxUnit::Failure
- Inherits:
-
Object
- Object
- VertxUnit::Failure
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb
Overview
A failure provides the details of a failure that happened during the execution of a test case.
The failure can be:
- an assertion failure: an assertion failed
- an error failure: an expected error occured
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (true, false) error?
True if the failure is an error failure otherwise it is an assertion failure.
-
- (String) message
The error message.
-
- (String) stack_trace
The stack trace.
Class Method Details
+ (Boolean) accept?(obj)
23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 23 def @@j_api_type.accept?(obj) obj.class == Failure end |
+ (Object) j_api_type
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 32 def self.j_api_type @@j_api_type end |
+ (Object) j_class
35 36 37 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 35 def self.j_class Java::IoVertxExtUnitReport::Failure.java_class end |
+ (Object) unwrap(obj)
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 29 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 26 def @@j_api_type.wrap(obj) Failure.new(obj) end |
Instance Method Details
- (true, false) error?
Returns true if the failure is an error failure otherwise it is an assertion failure
39 40 41 42 43 44 45 46 47 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 39 def error? if !block_given? if @cached_is_error != nil return @cached_is_error end return @cached_is_error = @j_del.java_method(:isError, []).call() end raise ArgumentError, "Invalid arguments when calling error?()" end |
- (String) message
Returns the error message
49 50 51 52 53 54 55 56 57 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 49 def if !block_given? if @cached_message != nil return @cached_message end return @cached_message = @j_del.java_method(:message, []).call() end raise ArgumentError, "Invalid arguments when calling message()" end |
- (String) stack_trace
Returns the stack trace
59 60 61 62 63 64 65 66 67 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/failure.rb', line 59 def stack_trace if !block_given? if @cached_stack_trace != nil return @cached_stack_trace end return @cached_stack_trace = @j_del.java_method(:stackTrace, []).call() end raise ArgumentError, "Invalid arguments when calling stack_trace()" end |