9#include <xtd/collections/generic/list>
10#include <xtd/date_time>
18 template<
class test_
class_t>
148 template<class test_class_t>
149 friend class
xtd::
tunit::test_class_attribute;
150 friend class
xtd::
tunit::test_class;
152 friend class
xtd::
tunit::base_assert;
156 xtd::
string get_filename(const
xtd::
string&
path);
157 xtd::
string cdata_message_to_xml_string(const
xtd::
tunit::test& test);
158 xtd::
string escape_path_to_json_string(const
xtd::
string&
path);
159 xtd::
string escape_to_json_string(const
xtd::
string& str);
160 xtd::
string escape_to_xml_string(const
xtd::
string& str);
161 xtd::
string message_to_json_string(const
xtd::
tunit::test& test);
162 xtd::
string message_to_xml_string(const
xtd::
tunit::test& test);
163 xtd::
string name_to_string(const
xtd::
string& name);
164 xtd::
string status_to_string(const
xtd::
tunit::test& test);
166 void unit_test_cleanup();
167 void unit_test_initialize();
168 void write_list_tests_json();
169 void write_list_tests_xml();
170 void write_tests_json();
171 void write_tests_xml();
174 xtd::
string name_ =
"AllTests";
177 int32 repeat_iteration_ = 0;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.hpp:85
Represents a time interval.
Definition time_span.hpp:29
Represent the event listener class. Unit test call theses events when unit tests are processing.
Definition event_listener.hpp:23
Represents the registered test class.
Definition registered_test_class.hpp:20
Represents a test class attribute.
Definition test_class_attribute.hpp:24
virtual int32 list_tests(const xtd::array< xtd::string > &tests)
Lists the test names contained in the specified tests.
size_t failed_test_count() const noexcept
Gets the failed test count.
size_t test_count() const noexcept
Gets the test count.
xtd::array< xtd::string > ignored_test_names() const noexcept
Gets the array of ignored test names.
xtd::array< xtd::string > aborted_test_names() const noexcept
Gets the array of aborted test names.
int32 repeat_iteration_count() const noexcept
Gets the repeat iteration count.
int32 run() noexcept
Runs all tests in this unit_test object and prints the result.
bool repeat_tests() const noexcept
Gets a boolean indictaes if there is repeat tests.
virtual int32 count_tests(int32 count)
Counts the test names contained in the specified tests.
xtd::array< xtd::string > succeed_test_names() const noexcept
Gets the array of succeed test names.
xtd::time_span elapsed_time() const noexcept
Gets the elapsed time for the execution of all tests in the unit test.
size_t aborted_test_count() const noexcept
Gets the aborted test count.
size_t succeed_test_count() const noexcept
Gets the succeed test count.
int32 repeat_iteration() const noexcept
Gets the repeat iteration number. A number between 0 and xtd::tunit::unit_test::repeat_iteration_coun...
unit_test(xtd::uptr< xtd::tunit::event_listener > event_listener, int argc, char *argv[]) noexcept
Initializes a new instance of xtd::tunit::unit_test with specified xtd::tunit::event_listener,...
virtual bool parse_arguments(const xtd::array< string > &args)
Parses the specified arguments.
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.
size_t ignored_test_count() const noexcept
Gets the ignored test count.
size_t test_cases_count() const noexcept
Gets the test cases count.
xtd::array< xtd::string > failed_test_names() const noexcept
Gets the array of failed test names.
Contains xtd::tunit::event_listener class.
#define tunit_export_
Define shared library export.
Definition tunit_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
@ path
The xtd::uri::local_path data.
Definition uri_components.hpp:27
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The tunit namespace contains a unit test library.
Definition abort_error.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::tunit::registered_test_class class.
Contains tunit_export_ keyword.
Contains xtd::tunit::settings class.