xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
event_listener.h
Go to the documentation of this file.
1 #pragma once
4 #include "class_event_args.h"
5 #include "test_event_args.h"
6 #include "tunit_event_args.h"
7 
9 namespace xtd {
11  namespace tunit {
18  public:
20  virtual ~event_listener() = default;
22 
25  virtual void on_class_cleanup_end(const xtd::tunit::class_event_args& e) const {}
26 
29  virtual void on_class_cleanup_start(const xtd::tunit::class_event_args& e) const {}
30 
33  virtual void on_class_end(const xtd::tunit::class_event_args& e) const {}
34 
37  virtual void on_class_initialize_end(const xtd::tunit::class_event_args& e) const {}
38 
42 
45  virtual void on_class_start(const xtd::tunit::class_event_args& e) const {}
46 
49  virtual void on_test_cleanup_end(const xtd::tunit::test_event_args& e) const {}
50 
53  virtual void on_test_cleanup_start(const xtd::tunit::test_event_args& e) const {}
54 
57  virtual void on_test_initialize_end(const xtd::tunit::test_event_args& e) const {}
58 
61  virtual void on_test_initialize_start(const xtd::tunit::test_event_args& e) const {}
62 
65  virtual void on_test_aborted(const xtd::tunit::test_event_args& e) const {}
66 
69  virtual void on_test_end(const xtd::tunit::test_event_args& e) const {}
70 
73  virtual void on_test_ignored(const xtd::tunit::test_event_args& e) const {}
74 
77  virtual void on_test_failed(const xtd::tunit::test_event_args& e) const {}
78 
81  virtual void on_test_start(const xtd::tunit::test_event_args& e) const {}
82 
85  virtual void on_test_succeed(const xtd::tunit::test_event_args& e) const {}
86 
90 
94 
97  virtual void on_unit_test_end(const xtd::tunit::tunit_event_args& e) const {}
98 
102 
106 
109  virtual void on_unit_test_start(const xtd::tunit::tunit_event_args& e) const {}
110  };
111  }
112 }
virtual void on_test_succeed(const xtd::tunit::test_event_args &e) const
Occurs when test is succeed.
Definition: event_listener.h:85
Provides data for the xtd::tunit::class_test events.
Definition: class_event_args.h:12
Contains xtd::tunit::test_event_args class.
virtual void on_test_end(const xtd::tunit::test_event_args &e) const
Occurs when test is ended.
Definition: event_listener.h:69
virtual void on_class_start(const xtd::tunit::class_event_args &e) const
Occurs when class is started.
Definition: event_listener.h:45
virtual void on_unit_test_end(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test is ended.
Definition: event_listener.h:97
virtual void on_class_cleanup_end(const xtd::tunit::class_event_args &e) const
Occurs when class cleanup is ended.
Definition: event_listener.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:15
virtual void on_test_ignored(const xtd::tunit::test_event_args &e) const
Occurs when test is ignored.
Definition: event_listener.h:73
Contains xtd::tunit::class_event_args class.
Represent the event listener class. Unit test call theses events when unit tests are processing...
Definition: event_listener.h:17
virtual void on_unit_test_cleanup_start(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test is started.
Definition: event_listener.h:93
virtual void on_test_cleanup_start(const xtd::tunit::test_event_args &e) const
Occurs when test cleanup is started.
Definition: event_listener.h:53
virtual void on_class_cleanup_start(const xtd::tunit::class_event_args &e) const
Occurs when class cleanup is started.
Definition: event_listener.h:29
virtual void on_class_initialize_start(const xtd::tunit::class_event_args &e) const
Occurs when class initialize is started.
Definition: event_listener.h:41
virtual void on_unit_test_initialize_start(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test initialize is ended.
Definition: event_listener.h:105
virtual void on_unit_test_start(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test cleanup is started.
Definition: event_listener.h:109
virtual void on_test_failed(const xtd::tunit::test_event_args &e) const
Occurs when test is failed.
Definition: event_listener.h:77
virtual void on_unit_test_cleanup_end(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test cleanup is ended.
Definition: event_listener.h:89
virtual void on_test_cleanup_end(const xtd::tunit::test_event_args &e) const
Occurs when test cleanup is ended.
Definition: event_listener.h:49
Provides data for the xtd::tunit::test events.
Definition: test_event_args.h:13
virtual void on_test_aborted(const xtd::tunit::test_event_args &e) const
Occurs when test is aborted.
Definition: event_listener.h:65
virtual void on_class_initialize_end(const xtd::tunit::class_event_args &e) const
Occurs when class initialize is ended.
Definition: event_listener.h:37
virtual void on_test_start(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is started.
Definition: event_listener.h:81
virtual void on_unit_test_initialize_end(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test initalize is ended.
Definition: event_listener.h:101
Contains xtd::tunit::tunit_event_args class.
virtual void on_class_end(const xtd::tunit::class_event_args &e) const
Occurs when class is ended.
Definition: event_listener.h:33
tunit_event_args is the base class for classes containing event data.
Definition: tunit_event_args.h:14
virtual void on_test_initialize_start(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is ended.
Definition: event_listener.h:61
virtual void on_test_initialize_end(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is ended.
Definition: event_listener.h:57