Test::DatabaseRow::Result3pm
Represent the result of some db testing
Usage
use Test::More tests => 1;use Test::DatabaseRow::Result;# create a test resultsmy $result_object = Test::DatabaseRow::Result->new(is_error => 1,diag => [ "The WHAM overheaded!" ]);# have those results render to Test::Builder$result_object->pass_to_test_builder("fire main gun");
Overview
This module is used by Test::DatabaseRow::Object to represent the result of a test.
Accessors
These are the read only accessors of the object. They may be (optionally) set at object creation time by passing their name and value to the constructor.
Each accessor may be queried by prefixing its name with the "has_" to determine
is_error
|
Boolean representing if this is an error or not. |
|---|---|
diag
|
An arrayref containing diagnostic error strings that can help explain any error. |
Methods
- new(...)
-
Simple constructor. Passing arguments to the constructor sets the values of the accessors.
- add_diag( @diagnostics )
-
Adds extra diagnostics to the
"diag"array.
- pass_to_test_builder( $description )
-
Causes this test to render itself out using
"Test::Builder"
- is_success
-
Returns true if and only if
"is_error"is false.
Releases
6 releases since Debian 8 (Jessie); the text changed 2 times.