xtd 0.2.0
ostream_event_listener.h
Go to the documentation of this file.
1 #pragma once
5 #include "event_listener.h"
6 #include <ostream>
7 
9 namespace xtd {
11  namespace tunit {
23  class tunit_export_ ostream_event_listener : public xtd::tunit::event_listener {
24  public:
26 
30  ostream_event_listener(std::ostream& os) noexcept;
32 
34 
38  void on_class_end(const xtd::tunit::class_event_args& e) const override;
39 
42  void on_class_start(const xtd::tunit::class_event_args& e) const override;
43 
46  void on_test_aborted(const xtd::tunit::test_event_args& e) const override;
47 
50  void on_unit_test_cleanup_start(const xtd::tunit::tunit_event_args& e) const override;
51 
54  void on_unit_test_initialize_start(const xtd::tunit::tunit_event_args& e) const override;
55 
58  void on_test_failed(const xtd::tunit::test_event_args& e) const override;
59 
62  void on_test_ignored(const xtd::tunit::test_event_args& e) const override;
63 
66  void on_test_start(const xtd::tunit::test_event_args& e) const override;
67 
70  void on_test_succeed(const xtd::tunit::test_event_args& e) const override;
71 
74  void on_unit_test_end(const xtd::tunit::tunit_event_args& e) const override;
75 
78  void on_unit_test_start(const xtd::tunit::tunit_event_args& e) const override;
80 
81  private:
82  std::ostream& os_;
83  };
84  }
85 }
Provides data for the xtd::tunit::class_test events.
Definition: class_event_args.h:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
The ostream_unit_test class is a specialisation of event_listener class for writing events in std::os...
Definition: ostream_event_listener.h:23
Represent the event listener class. Unit test call theses events when unit tests are processing...
Definition: event_listener.h:23
Provides data for the xtd::tunit::test events.
Definition: test_event_args.h:19
Contains xtd::tunit::event_listener class.
tunit_event_args is the base class for classes containing event data.
Definition: tunit_event_args.h:19