Class: VertxUnit::EventBusCollector
- Inherits:
-
Object
- Object
- VertxUnit::EventBusCollector
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb
Overview
The event bus collector listen to events on the Vert.x event bus and translate them
into reports.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (::VertxUnit::EventBusCollector) create(*args)
-
+ (Object) EVENT_TEST_CASE_BEGIN
Json type field value that signals a test case begins, used as part of the test reporting protocol for the event bus.
-
+ (Object) EVENT_TEST_CASE_END
Json type field value that signals a test case ends, used as part of the test reporting protocol for the event bus.
-
+ (Object) EVENT_TEST_SUITE_BEGIN
Json type field value that signals a test suite begins, used as part of the test reporting protocol for the event bus.
-
+ (Object) EVENT_TEST_SUITE_END
Json type field value that signals a test suite ends, used as part of the test reporting protocol for the event bus.
-
+ (Object) EVENT_TEST_SUITE_ERROR
Json type field value that reports a test suite error, used as part of the test reporting protocol for the event bus.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (::Vertx::MessageConsumer) register(address)
Register the collector as a consumer of the event bus with the specified address.
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/event_bus_collector.rb', line 22 def @@j_api_type.accept?(obj) obj.class == EventBusCollector end |
+ (::VertxUnit::EventBusCollector) create(vertx, options) + (::VertxUnit::EventBusCollector) create(vertx, reporter) { ... }
44 45 46 47 48 49 50 51 52 53 54 55 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 44 def self.create(*args) if args[0].class.method_defined?(:j_del) && args[1].class == Hash && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtUnitCollect::EventBusCollector.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtUnitReport::ReportingOptions.java_class]).call(args[0].j_del,Java::IoVertxExtUnitReport::ReportingOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::VertxUnit::EventBusCollector) elsif args[0].class.method_defined?(:j_del) && true && args[1] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtUnitCollect::EventBusCollector.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxUnit::TestSuiteReport)) unless !block_given? })),::VertxUnit::EventBusCollector) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]})" end end |
+ (Object) EVENT_TEST_CASE_BEGIN
Json
type
field value that signals a test case begins, used as part of the test reporting
protocol for the event bus.
87 88 89 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 87 def self.EVENT_TEST_CASE_BEGIN Java::IoVertxExtUnitCollect::EventBusCollector.EVENT_TEST_CASE_BEGIN end |
+ (Object) EVENT_TEST_CASE_END
Json
type
field value that signals a test case ends, used as part of the test reporting
protocol for the event bus.
92 93 94 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 92 def self.EVENT_TEST_CASE_END Java::IoVertxExtUnitCollect::EventBusCollector.EVENT_TEST_CASE_END end |
+ (Object) EVENT_TEST_SUITE_BEGIN
Json
type
field value that signals a test suite begins, used as part of the test reporting
protocol for the event bus.
72 73 74 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 72 def self.EVENT_TEST_SUITE_BEGIN Java::IoVertxExtUnitCollect::EventBusCollector.EVENT_TEST_SUITE_BEGIN end |
+ (Object) EVENT_TEST_SUITE_END
Json
type
field value that signals a test suite ends, used as part of the test reporting
protocol for the event bus.
77 78 79 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 77 def self.EVENT_TEST_SUITE_END Java::IoVertxExtUnitCollect::EventBusCollector.EVENT_TEST_SUITE_END end |
+ (Object) EVENT_TEST_SUITE_ERROR
Json
type
field value that reports a test suite error, used as part of the test reporting
protocol for the event bus.
82 83 84 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 82 def self.EVENT_TEST_SUITE_ERROR Java::IoVertxExtUnitCollect::EventBusCollector.EVENT_TEST_SUITE_ERROR 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/event_bus_collector.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/event_bus_collector.rb', line 34 def self.j_class Java::IoVertxExtUnitCollect::EventBusCollector.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/event_bus_collector.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/event_bus_collector.rb', line 25 def @@j_api_type.wrap(obj) EventBusCollector.new(obj) end |
Instance Method Details
- (::Vertx::MessageConsumer) register(address)
Register the collector as a consumer of the event bus with the specified address.
60 61 62 63 64 65 66 67 68 69 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/event_bus_collector.rb', line 60 def register(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:register, [Java::java.lang.String.java_class]).call(args[0]),::Vertx::MessageConsumer) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling register(#{args[0]})" end end |