Class: VertxUnit::TestResult

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb

Overview

The result of a test.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


19
20
21
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 19

def @@j_api_type.accept?(obj)
  obj.class == TestResult
end

+ (Object) j_api_type



28
29
30
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 28

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



31
32
33
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 31

def self.j_class
  Java::IoVertxExtUnitReport::TestResult.java_class
end

+ (Object) unwrap(obj)



25
26
27
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 25

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



22
23
24
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 22

def @@j_api_type.wrap(obj)
  TestResult.new(obj)
end

Instance Method Details

- (Fixnum) beginTime

The time at which the test began in millis.

Returns:

  • (Fixnum)


101
102
103
104
105
106
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_result.rb', line 101

def begin_time
  if !block_given?
    if @cached_begin_time != nil
      return @cached_begin_time
    end
    return @cached_begin_time = @j_del.java_method(:beginTime, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling begin_time()"
  end
end

- (Fixnum) durationTime

How long the test lasted in millis.

Returns:

  • (Fixnum)


37
38
39
40
41
42
43
44
45
46
47
48
49
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 37

def duration_time
  if !block_given?
    if @cached_duration_time != nil
      return @cached_duration_time
    end
    return @cached_duration_time = @j_del.java_method(:durationTime, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling duration_time()"
  end
end

- (true, false) failed

Did it fail?

Returns:

  • (true, false)


85
86
87
88
89
90
91
92
93
94
95
96
97
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 85

def failed?
  if !block_given?
    if @cached_failed != nil
      return @cached_failed
    end
    return @cached_failed = @j_del.java_method(:failed, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling failed?()"
  end
end

- (::VertxUnit::Failure) failure

An exception describing failure, null if the test succeeded.


53
54
55
56
57
58
59
60
61
62
63
64
65
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 53

def failure
  if !block_given?
    if @cached_failure != nil
      return @cached_failure
    end
    return @cached_failure = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:failure, []).call(),::VertxUnit::Failure)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling failure()"
  end
end

- (String) name

The test description, may be null if none was provided.

Returns:

  • (String)


69
70
71
72
73
74
75
76
77
78
79
80
81
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 69

def name
  if !block_given?
    if @cached_name != nil
      return @cached_name
    end
    return @cached_name = @j_del.java_method(:name, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling name()"
  end
end

- (true, false) succeeded

Did it succeed?

Returns:

  • (true, false)


117
118
119
120
121
122
123
124
125
126
127
128
129
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 117

def succeeded?
  if !block_given?
    if @cached_succeeded != nil
      return @cached_succeeded
    end
    return @cached_succeeded = @j_del.java_method(:succeeded, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling succeeded?()"
  end
end