Represents a test method.
Public Constructors | |
| test ()=default | |
| Creates a new test instance. | |
| test (const xtd::string &name, const std::function< void()> &method, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) noexcept | |
| Creates a new test instance with specified name, method and stack frame. | |
| test (const xtd::string &name, const std::function< void()> &method, bool ignore, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) noexcept | |
| Creates a new test instance with specified name, method and stack frame. | |
Public Properties | |
| bool | aborted () const noexcept |
| Gets a value that represent an aborted test. | |
| const xtd::string & | actual () const noexcept |
| Gets the actual value string. | |
| xtd::time_span | elapsed_time () const noexcept |
| Gets the elapsed time of the test method. | |
| const xtd::string & | expect () const noexcept |
| Gets the expect value string. | |
| bool | failed () const noexcept |
| Gest a value that represent an failed test. | |
| bool | ignored () const noexcept |
| Get a value that represent an ignored test. | |
| bool | not_started () const noexcept |
| Get a value that represent a not started test. | |
| bool | succeed () const noexcept |
| Gets a value that represent an succeed test. | |
| const xtd::diagnostics::stack_frame | stack_frame () const noexcept |
| Gets the stack frame of the test method. | |
| const xtd::date_time & | start_time () const noexcept |
| Gets the start time of the test method. | |
| std::function< void()> | method () const noexcept |
| Gets the test method. | |
| const xtd::string & | message () const noexcept |
| Gets the message. | |
| const xtd::string & | name () const noexcept |
| Gets the name of the test method. | |
| const xtd::string & | user_message () const noexcept |
| Gets the user message. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | equals (const object &obj) const noexcept -> bool |
| Determines whether the specified object is equal to the current object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
|
default |
Creates a new test instance.
|
noexcept |
Creates a new test instance with specified name, method and stack frame.
| name | Represents the name of the method. Generally is the same name as the method name. |
| method | The method that contains the test. |
| stack_frame | The stack frame of the method. |
|
noexcept |
Creates a new test instance with specified name, method and stack frame.
| name | Represents the name of the method. Generally is the same name as the method name. |
| method | The method that contains the test. |
| ignored | If true, the test will be ignored during tests execution; otherwise, the test will be taken into account during tests execution. |
| stack_frame | The stack frame of the method. |
|
noexcept |
Gets a value that represent an aborted test.
|
noexcept |
Gets the actual value string.
|
noexcept |
Gets the elapsed time of the test method.
|
noexcept |
Gets the expect value string.
|
noexcept |
Gest a value that represent an failed test.
|
noexcept |
Get a value that represent an ignored test.
|
noexcept |
Get a value that represent a not started test.
|
noexcept |
Gets a value that represent an succeed test.
|
noexcept |
Gets the stack frame of the test method.
|
noexcept |
Gets the start time of the test method.
|
noexcept |
Gets the test method.
|
noexcept |
Gets the message.
|
noexcept |
Gets the name of the test method.
|
noexcept |
Gets the user message.