Class List Method List File List

# Class: VertxUnit::TestCase

Inherits:
  Object
  - Object
  - VertxUnit::TestCase
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-unit/src/main/resources/vertx-unit/test_case.rb

## Overview

A test case object can be used to create a single test.

## Class Method Summary (collapse)

- + (::VertxUnit::TestCase) create(name = nil) { ... }
  Create a test case.

## Class Method Details

### + (`::VertxUnit::TestCase`) create(name = nil) { ... }

Create a test case.

Parameters:

- name (`String`) (defaults to: `nil`) —
  the test case name

Yields:

- the test case

Returns:

- (`::VertxUnit::TestCase`) —
  the created test case

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-unit/src/main/resources/vertx-unit/test_case.rb', line 21

    def self.create(name=nil)
      if name.class == String && block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtUnit::TestCase.java_method(:create, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxUnit::TestContext)) })),::VertxUnit::TestCase)
      end
      raise ArgumentError, "Invalid arguments when calling create(name)"
    end