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)


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

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

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

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

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (Fixnum) begin_time

The time at which the test began in millis.

Returns:

  • (Fixnum)

Raises:

  • (ArgumentError)


46
47
48
49
50
51
52
53
54
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 46

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
  raise ArgumentError, "Invalid arguments when calling begin_time()"
end

- (Fixnum) duration_time

How long the test lasted in millis.

Returns:

  • (Fixnum)

Raises:

  • (ArgumentError)


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 57

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
  raise ArgumentError, "Invalid arguments when calling duration_time()"
end

- (true, false) failed?

Did it fail?

Returns:

  • (true, false)

Raises:

  • (ArgumentError)


79
80
81
82
83
84
85
86
87
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 79

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

- (::VertxUnit::Failure) failure

An exception describing failure, null if the test succeeded.

Returns:

Raises:

  • (ArgumentError)


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

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
  raise ArgumentError, "Invalid arguments when calling failure()"
end

- (String) name

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

Returns:

  • (String)

Raises:

  • (ArgumentError)


35
36
37
38
39
40
41
42
43
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-unit/test_result.rb', line 35

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

- (true, false) succeeded?

Did it succeed?

Returns:

  • (true, false)

Raises:

  • (ArgumentError)


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

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