public void Append_WithMockServer_Succeeds() { var logEventInfo = new LogEventInfo(LogLevel.Debug, "logger", "message"); var nLogEventAdapter = new NLogEventAdapter("message", logEventInfo); using (var thriftClient = new LegacyThriftClient("localhost", 9090)) { thriftClient.Append(nLogEventAdapter); } }
public void Body_MessageSet_BodyEqualsMessage() { const string expected = "message"; var logEventInfo = new LogEventInfo(); var nLogEventAdapter = new NLogEventAdapter(expected, logEventInfo); Assert.AreEqual(expected, nLogEventAdapter.Body); }
public void Fields_PropertiesSet_FieldsEqualsProperties() { var logEventInfo = new LogEventInfo(); logEventInfo.Properties.Add("foo", "bar"); var nLogEventAdapter = new NLogEventAdapter("message", logEventInfo); Assert.IsNotNull(nLogEventAdapter.Fields); Assert.AreEqual("bar", nLogEventAdapter.Fields["foo"]); }