The unit_test class is unit test base interface.
Public Constructors | |
| unit_test (xtd::uptr< xtd::tunit::event_listener > event_listener) noexcept | |
| Initializes a new instance of xtd::tunit::unit_test with specified xtd::tunit::event_listener. | |
Public Properties | |
| auto | repeat_iteration () const noexcept -> xtd::int32 |
| Gets the repeat iteration number. A number between 0 and xtd::tunit::unit_test::repeat_iteration_count. | |
| auto | repeat_iteration_count () const noexcept -> xtd::int32 |
| Gets the repeat iteration count. | |
| auto | repeat_tests () const noexcept -> bool |
| Gets a boolean indictaes if there is repeat tests. | |
| auto | test_cases_count () const noexcept -> xtd::usize |
| Gets the test cases count. | |
| auto | test_count () const noexcept -> xtd::usize |
| Gets the test count. | |
| auto | aborted_test_count () const noexcept -> xtd::usize |
| Gets the aborted test count. | |
| auto | aborted_test_names () const noexcept -> xtd::array< xtd::string > |
| Gets the array of aborted test names. | |
| auto | elapsed_time () const noexcept -> xtd::time_span |
| Gets the elapsed time for the execution of all tests in the unit test. | |
| auto | ignored_test_count () const noexcept -> xtd::usize |
| Gets the ignored test count. | |
| auto | ignored_test_names () const noexcept -> xtd::array< xtd::string > |
| Gets the array of ignored test names. | |
| auto | failed_test_count () const noexcept -> xtd::usize |
| Gets the failed test count. | |
| auto | failed_test_names () const noexcept -> xtd::array< xtd::string > |
| Gets the array of failed test names. | |
| auto | succeed_test_count () const noexcept -> xtd::usize |
| Gets the succeed test count. | |
| auto | succeed_test_names () const noexcept -> xtd::array< xtd::string > |
| Gets the array of succeed test names. | |
Public Methods | |
| auto | run () noexcept -> xtd::int32 |
| Runs all tests in this unit_test object and prints the result. | |
Protected Methods | |
| virtual auto | count_tests (xtd::int32 count) -> xtd::int32 |
| Counts the test names contained in the specified tests. | |
| virtual auto | list_tests (const xtd::array< xtd::string > &tests) -> xtd::int32 |
| Lists the test names contained in the specified tests. | |
| virtual auto | parse_arguments (const xtd::array< string > &args) -> bool |
| Parses the specified arguments. | |
|
explicitnoexcept |
Initializes a new instance of xtd::tunit::unit_test with specified xtd::tunit::event_listener.
| event_listener | The event listener associate to the unit tests. |
|
nodiscardnoexcept |
Gets the repeat iteration number. A number between 0 and xtd::tunit::unit_test::repeat_iteration_count.
|
nodiscardnoexcept |
Gets the repeat iteration count.
|
nodiscardnoexcept |
Gets a boolean indictaes if there is repeat tests.
|
nodiscardnoexcept |
Gets the test cases count.
|
nodiscardnoexcept |
Gets the test count.
|
nodiscardnoexcept |
Gets the aborted test count.
|
nodiscardnoexcept |
Gets the array of aborted test names.
|
nodiscardnoexcept |
Gets the elapsed time for the execution of all tests in the unit test.
|
nodiscardnoexcept |
Gets the ignored test count.
|
nodiscardnoexcept |
Gets the array of ignored test names.
|
nodiscardnoexcept |
Gets the failed test count.
|
nodiscardnoexcept |
Gets the array of failed test names.
|
nodiscardnoexcept |
Gets the succeed test count.
|
nodiscardnoexcept |
Gets the array of succeed test names.
|
noexcept |
Runs all tests in this unit_test object and prints the result.
|
nodiscardprotectedvirtual |
Counts the test names contained in the specified tests.
| count | The tests count. |
Reimplemented in xtd::tunit::ostream_unit_test.
|
nodiscardprotectedvirtual |
Lists the test names contained in the specified tests.
| tests | The list of test names. |
Reimplemented in xtd::tunit::ostream_unit_test.
|
nodiscardprotectedvirtual |
Parses the specified arguments.
| The | arguments to parse. |
-help argument is passed. Reimplemented in xtd::tunit::ostream_unit_test.