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);
        }
Exemple #3
0
        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"]);
        }
        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);
            }
        }
Exemple #6
0
        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"]);
        }