#24 Change Stacks to scope on thread

parent 841dc390
Pipeline #105 canceled with stages
in 9 minutes and 15 seconds
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>public.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
</PropertyGroup>
......
......@@ -22,7 +22,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -33,8 +33,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -45,8 +45,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -57,8 +57,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_receivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_lastReceivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
}
[TestMethod]
......@@ -69,8 +69,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._receivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._lastReceivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
}
}
......
......@@ -29,7 +29,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -48,8 +48,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -67,8 +67,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -89,8 +89,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -112,8 +112,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._receivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._lastReceivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
}
}
......
......@@ -30,7 +30,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -49,8 +49,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -68,8 +68,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(this._message, this._receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(this._message, this._lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -90,8 +90,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -108,8 +108,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(this._tags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are record tags.");
}
......@@ -127,8 +127,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in this._tags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a recorded tag.");
......
......@@ -21,7 +21,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -30,8 +30,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -40,8 +40,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -50,8 +50,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_receivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_lastReceivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
}
[TestMethod]
......@@ -68,8 +68,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(this._tags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are record tags.");
}
......@@ -87,8 +87,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in this._tags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a recorded tag.");
......
......@@ -31,7 +31,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -49,8 +49,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -71,8 +71,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(this._receivedRecord.Message, "Message in received ChronicleRecord is not null.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(this._lastReceivedRecord.Message, "Message in received ChronicleRecord is not null.");
}
[TestMethod]
......@@ -93,8 +93,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -116,8 +116,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._receivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(this._lastReceivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
}
}
......
......@@ -30,7 +30,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -48,8 +48,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -70,8 +70,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(this._receivedRecord.Message, "Message in received ChronicleRecord is not null.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(this._lastReceivedRecord.Message, "Message in received ChronicleRecord is not null.");
}
[TestMethod]
......@@ -92,8 +92,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -110,8 +110,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(this._tags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are record tags.");
}
......@@ -129,8 +129,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, exception: e, tags: this._tags);
}
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in this._tags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a recorded tag.");
......
......@@ -27,7 +27,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -38,8 +38,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -50,8 +50,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -62,8 +62,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_receivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_lastReceivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
}
[TestMethod]
......@@ -74,8 +74,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(_persistedTags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are persisted tags.");
}
......@@ -87,8 +87,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in _persistedTags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a persisted tag.");
......
......@@ -26,7 +26,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, this._message);
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -38,8 +38,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, this._message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -51,8 +51,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, this._message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -64,8 +64,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, this._message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_receivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsNull(_lastReceivedRecord.Exception, "An Exception is unexpectedly attached to the received ChronicleRecord.");
}
[TestMethod]
......@@ -77,8 +77,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, this._message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(_receivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.IsFalse(_lastReceivedRecord.Tags.GetEnumerator().MoveNext(), "Unexpected tags in received ChronicleRecord");
}
}
......
......@@ -33,7 +33,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -52,8 +52,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -71,8 +71,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -93,8 +93,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -105,8 +105,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(_persistedTags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are persisted tags.");
}
......@@ -118,8 +118,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
CallAction(level, _message);
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in _persistedTags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a persisted tag.");
......
......@@ -33,7 +33,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -52,8 +52,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, this._lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -71,8 +71,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(this._message, this._receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(this._message, this._lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -93,8 +93,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._receivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(new ChronicleException(exception), this._lastReceivedRecord.Exception, "Exception in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -112,8 +112,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = this._receivedRecord.Tags.ToArray();
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = this._lastReceivedRecord.Tags.ToArray();
Assert.AreEqual(this._persistedTags.Length + this._tags.Length, receivedTags.Length, "There are more or less tags on received ChronicleRecord than there are persisted tags.");
}
......@@ -132,8 +132,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(this._receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = this._receivedRecord.Tags.ToArray();
Assert.IsNotNull(this._lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = this._lastReceivedRecord.Tags.ToArray();
foreach (string tag in this._persistedTags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a persisted tag.");
......@@ -155,8 +155,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
}
// Assert
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _receivedRecord.Tags.ToArray();
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
string[] receivedTags = _lastReceivedRecord.Tags.ToArray();
foreach (string tag in this._tags)
{
Assert.IsTrue(receivedTags.Contains(tag), "Tags on received ChronicleRecord do not include a persisted tag.");
......
......@@ -24,7 +24,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
}
[TestMethod]
......@@ -33,8 +33,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _receivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(level, _lastReceivedRecord.Level, "Incorrect ChronicleLevel on received ChronicleRecord.");
}
[TestMethod]
......@@ -43,8 +43,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);
Assert.IsNotNull(_receivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _receivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
Assert.IsNotNull(_lastReceivedRecord, "No ChronicleRecord was received.");
Assert.AreEqual(_message, _lastReceivedRecord.Message, "Message in received ChronicleRecord is not as recorded.");
}
[TestMethod]
......@@ -53,8 +53,8 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
{
CallAction(level, this._message, tags: this._tags);