6 namespace Deveel.Data.Diagnostics {
12 Assert.DoesNotThrow(() =>
Query.Route<
ErrorEvent>(@event => firedEvent = @event));
13 Assert.IsNull(firedEvent);
18 var reset =
new AutoResetEvent(
false);
26 Query.OnError(
new Exception(
"Test Error"));
30 Assert.IsNotNull(firedEvent);
36 var reset =
new AutoResetEvent(
false);
44 Query.OnVerbose(
"Test Message");
48 Assert.IsNotNull(fired);
53 Assert.AreEqual(
"Test Message", infoEvent.Message);
58 var reset1 =
new AutoResetEvent(
false);
59 var reset2 =
new AutoResetEvent(
false);
67 IEvent sessionFired = null;
74 Query.OnVerbose(
"Test Message");
79 Assert.IsNotNull(systemFired);
80 Assert.IsNull(sessionFired);
85 var reset1 =
new AutoResetEvent(
false);
86 var reset2 =
new AutoResetEvent(
false);
94 IEvent sessionFired = null;
101 Query.OnVerbose(
"Test Message");
106 Assert.IsNotNull(systemFired);
107 Assert.IsNull(sessionFired);
112 var reset1 =
new AutoResetEvent(
false);
113 var reset2 =
new AutoResetEvent(
false);
115 IEvent systemFired = null;
121 IEvent sessionFired = null;
128 Query.OnVerbose(
"Test Message");
133 Assert.IsNotNull(systemFired);
134 Assert.IsNotNull(sessionFired);
139 var reset =
new AutoResetEvent(
false);
151 Query.OnVerbose(
"Test Message");
155 Assert.IsNotNull(fired);
163 Assert.AreEqual(
"Test Message", infoEvent.Message);
This is an event occurred during the lifetime of a database.
void FireAtLowerLevelAndListenAtHighest()
This is a session that is constructed around a given user and a transaction, to the given database...
void RouteOnlyOnceForSameEventType()
void RouteTwiceForSameEventType()
void RouteOneRegisteredMany()