xtd - Reference Guide  0.1.1
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
5 #include "class_event_args.h"
6 #include "test_event_args.h"
7 #include "tunit_event_args.h"
8 
10 namespace xtd {
12  namespace tunit {
24  public:
26  virtual ~event_listener() = default;
28 
31  virtual void on_class_cleanup_end(const xtd::tunit::class_event_args& e) const {}
32 
35  virtual void on_class_cleanup_start(const xtd::tunit::class_event_args& e) const {}
36 
39  virtual void on_class_end(const xtd::tunit::class_event_args& e) const {}
40 
43  virtual void on_class_initialize_end(const xtd::tunit::class_event_args& e) const {}
44 
48 
51  virtual void on_class_start(const xtd::tunit::class_event_args& e) const {}
52 
55  virtual void on_test_cleanup_end(const xtd::tunit::test_event_args& e) const {}
56 
59  virtual void on_test_cleanup_start(const xtd::tunit::test_event_args& e) const {}
60 
63  virtual void on_test_initialize_end(const xtd::tunit::test_event_args& e) const {}
64 
67  virtual void on_test_initialize_start(const xtd::tunit::test_event_args& e) const {}
68 
71  virtual void on_test_aborted(const xtd::tunit::test_event_args& e) const {}
72 
75  virtual void on_test_end(const xtd::tunit::test_event_args& e) const {}
76 
79  virtual void on_test_ignored(const xtd::tunit::test_event_args& e) const {}
80 
83  virtual void on_test_failed(const xtd::tunit::test_event_args& e) const {}
84 
87  virtual void on_test_start(const xtd::tunit::test_event_args& e) const {}
88 
91  virtual void on_test_succeed(const xtd::tunit::test_event_args& e) const {}
92 
96 
100 
103  virtual void on_unit_test_end(const xtd::tunit::tunit_event_args& e) const {}
104 
108 
112 
115  virtual void on_unit_test_start(const xtd::tunit::tunit_event_args& e) const {}
116  };
117  }
118 }
Contains xtd::tunit::class_event_args class.
Provides data for the xtd::tunit::class_test events.
Definition: class_event_args.h:18
Represent the event listener class. Unit test call theses events when unit tests are processing.
Definition: event_listener.h:23
virtual void on_test_cleanup_end(const xtd::tunit::test_event_args &e) const
Occurs when test cleanup is ended.
Definition: event_listener.h:55
virtual void on_class_cleanup_end(const xtd::tunit::class_event_args &e) const
Occurs when class cleanup is ended.
Definition: event_listener.h:31
virtual void on_test_aborted(const xtd::tunit::test_event_args &e) const
Occurs when test is aborted.
Definition: event_listener.h:71
virtual void on_test_end(const xtd::tunit::test_event_args &e) const
Occurs when test is ended.
Definition: event_listener.h:75
virtual void on_class_initialize_end(const xtd::tunit::class_event_args &e) const
Occurs when class initialize is ended.
Definition: event_listener.h:43
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:111
virtual void on_class_cleanup_start(const xtd::tunit::class_event_args &e) const
Occurs when class cleanup is started.
Definition: event_listener.h:35
virtual void on_class_initialize_start(const xtd::tunit::class_event_args &e) const
Occurs when class initialize is started.
Definition: event_listener.h:47
virtual void on_class_start(const xtd::tunit::class_event_args &e) const
Occurs when class is started.
Definition: event_listener.h:51
virtual void on_test_initialize_end(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is ended.
Definition: event_listener.h:63
virtual void on_test_succeed(const xtd::tunit::test_event_args &e) const
Occurs when test is succeed.
Definition: event_listener.h:91
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:99
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:115
virtual void on_test_cleanup_start(const xtd::tunit::test_event_args &e) const
Occurs when test cleanup is started.
Definition: event_listener.h:59
virtual void on_test_start(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is started.
Definition: event_listener.h:87
virtual void on_unit_test_end(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test is ended.
Definition: event_listener.h:103
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:95
virtual void on_test_ignored(const xtd::tunit::test_event_args &e) const
Occurs when test is ignored.
Definition: event_listener.h:79
virtual void on_class_end(const xtd::tunit::class_event_args &e) const
Occurs when class is ended.
Definition: event_listener.h:39
virtual void on_test_failed(const xtd::tunit::test_event_args &e) const
Occurs when test is failed.
Definition: event_listener.h:83
virtual void on_unit_test_initialize_end(const xtd::tunit::tunit_event_args &e) const
Occurs when unit test initialize is ended.
Definition: event_listener.h:107
virtual void on_test_initialize_start(const xtd::tunit::test_event_args &e) const
Occurs when test initialize is ended.
Definition: event_listener.h:67
Provides data for the xtd::tunit::test events.
Definition: test_event_args.h:19
tunit_event_args is the base class for classes containing event data.
Definition: tunit_event_args.h:20
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::tunit::test_event_args class.
Contains xtd::tunit::tunit_event_args class.