xtd 0.2.0
Loading...
Searching...
No Matches
ostream_event_listener.h
Go to the documentation of this file.
1
4#pragma once
5#include "event_listener.h"
6#include <ostream>
7
9namespace xtd {
11 namespace tunit {
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
51
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
Represent the event listener class. Unit test call theses events when unit tests are processing.
Definition event_listener.h:23
The ostream_unit_test class is a specialisation of event_listener class for writing events in std::os...
Definition ostream_event_listener.h:23
void on_class_end(const xtd::tunit::class_event_args &e) const override
Occurs when class is ended.
void on_class_start(const xtd::tunit::class_event_args &e) const override
Occurs when class cleanup is started.
void on_unit_test_initialize_start(const xtd::tunit::tunit_event_args &e) const override
Occurs when unit test initialize is started.
void on_test_start(const xtd::tunit::test_event_args &e) const override
Occurs when test initialize is started.
void on_test_aborted(const xtd::tunit::test_event_args &e) const override
Occurs when test is aborted.
void on_unit_test_end(const xtd::tunit::tunit_event_args &e) const override
Occurs when unit test is ended.
void on_test_failed(const xtd::tunit::test_event_args &e) const override
Occurs when test is failed.
void on_unit_test_cleanup_start(const xtd::tunit::tunit_event_args &e) const override
Occurs when test initialize is started.
ostream_event_listener(std::ostream &os) noexcept
Creates new instance ostream event lister with ostream specified.
void on_test_ignored(const xtd::tunit::test_event_args &e) const override
Occurs when test is ignored.
void on_test_succeed(const xtd::tunit::test_event_args &e) const override
Occurs when test is succeed.
void on_unit_test_start(const xtd::tunit::tunit_event_args &e) const override
Occurs when unit test cleanup is started.
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:19
Contains xtd::tunit::event_listener class.
#define tunit_export_
Define shared library export.
Definition tunit_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10