Class: VertxUnit::TestSuiteReport
- Inherits:
-
Object
- Object
- VertxUnit::TestSuiteReport
show all
- Includes:
- Vertx::ReadStream
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb
Overview
The test suite reports is basically a stream of events reporting the test suite execution.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
+ (Boolean) accept?(obj)
22
23
24
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 22
def @@j_api_type.accept?(obj)
obj.class == TestSuiteReport
end
|
+ (Object) j_api_type
31
32
33
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 31
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
34
35
36
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 34
def self.j_class
Java::IoVertxExtUnitReport::TestSuiteReport.java_class
end
|
+ (Object) unwrap(obj)
28
29
30
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 28
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
25
26
27
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 25
def @@j_api_type.wrap(obj)
TestSuiteReport.new(obj)
end
|
Instance Method Details
- (self) end_handler { ... }
124
125
126
127
128
129
130
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 124
def end_handler
if block_given?
@j_del.java_method(:endHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
return self
end
raise ArgumentError, "Invalid arguments when calling end_handler()"
end
|
- (self) exception_handler { ... }
Set an exception handler, the exception handler reports the test suite errors, it can be called mulitple
times before the test ends.
90
91
92
93
94
95
96
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 90
def exception_handler
if block_given?
@j_del.java_method(:exceptionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) }))
return self
end
raise ArgumentError, "Invalid arguments when calling exception_handler()"
end
|
- (self) fetch(amount = nil)
Fetch the specified amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.
42
43
44
45
46
47
48
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 42
def fetch(amount=nil)
if amount.class == Fixnum && !block_given?
@j_del.java_method(:fetch, [Java::long.java_class]).call(amount)
return self
end
raise ArgumentError, "Invalid arguments when calling fetch(#{amount})"
end
|
- (self) handler { ... }
99
100
101
102
103
104
105
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 99
def handler
if block_given?
@j_del.java_method(:handler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxUnit::TestCaseReport)) }))
return self
end
raise ArgumentError, "Invalid arguments when calling handler()"
end
|
- (String) name
Returns the test suite name
77
78
79
80
81
82
83
84
85
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 77
def name
if !block_given?
if @cached_name != nil
return @cached_name
end
return @cached_name = @j_del.java_method(:name, []).call()
end
raise ArgumentError, "Invalid arguments when calling name()"
end
|
- (self) pause
107
108
109
110
111
112
113
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 107
def pause
if !block_given?
@j_del.java_method(:pause, []).call()
return self
end
raise ArgumentError, "Invalid arguments when calling pause()"
end
|
Pause this stream and return a to transfer the elements of this stream to a destination .
The stream will be resumed when the pipe will be wired to a
WriteStream
.
53
54
55
56
57
58
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 53
def pipe
if !block_given?
return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:pipe, []).call(),::Vertx::Pipe,::VertxUnit::TestCaseReport.j_api_type)
end
raise ArgumentError, "Invalid arguments when calling pipe()"
end
|
- (void) pipe_to(dst = nil) { ... }
This method returns an undefined value.
Pipe this
ReadStream
to the
WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
68
69
70
71
72
73
74
75
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 68
def pipe_to(dst=nil)
if dst.class.method_defined?(:j_del) && !block_given?
return @j_del.java_method(:pipeTo, [Java::IoVertxCoreStreams::WriteStream.java_class]).call(dst.j_del)
elsif dst.class.method_defined?(:j_del) && block_given?
return @j_del.java_method(:pipeTo, [Java::IoVertxCoreStreams::WriteStream.java_class,Java::IoVertxCore::Handler.java_class]).call(dst.j_del,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
end
raise ArgumentError, "Invalid arguments when calling pipe_to(#{dst})"
end
|
- (self) resume
115
116
117
118
119
120
121
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_suite_report.rb', line 115
def resume
if !block_given?
@j_del.java_method(:resume, []).call()
return self
end
raise ArgumentError, "Invalid arguments when calling resume()"
end
|