#include <class_initialize_attribute.h>
This attribute is use to add initialize class method to class test attribute.
- Namespace
- xtd::tunit
- Library
- xtd.tunit
- Examples
- The following example shows how to use xtd::tunit::class_initialize_attribute class.
#include <xtd/xtd.tunit>
namespace unit_tests {
public:
static void class_initialize() {
}
static void class_cleanup() {
}
static void test_initialize() {
}
static void test_cleanup() {
}
void test_case1() {
}
void test_case2() {
}
void test_case3() {
}
};
}
auto main()->int {
}
- Examples:
- test_class_without_helpers.cpp.
◆ class_initialize_attribute() [1/2]
template<typename test_class_t >
xtd::tunit::class_initialize_attribute::class_initialize_attribute |
( |
const std::string & |
name, |
|
|
test_class_t & |
test_class, |
|
|
void(*)() |
method |
|
) |
| |
|
inlinenoexcept |
Creates new instance of class initialize_attribute attribute.
- Parameters
-
name | Name of attribute |
test_class | xtd::tunit::class_test containing initialize method. |
method | Initialize class method. |
◆ class_initialize_attribute() [2/2]
template<typename test_class_t >
xtd::tunit::class_initialize_attribute::class_initialize_attribute |
( |
const std::string & |
name, |
|
|
test_class_t & |
test_class, |
|
|
void(*)() |
method, |
|
|
const xtd::diagnostics::stack_frame & |
caller |
|
) |
| |
|
inlinenoexcept |
Creates new instance of class initialize_attribute attribute.
- Parameters
-
name | Name of attribute |
test_class | xtd::tunit::class_test containing initialize method. |
method | Initialize class method. |
stack_frame | Contains information about current file and current line. |
The documentation for this class was generated from the following file: