public void LogsExit()
        {
            Log4NetTracingInterceptor logger = new Log4NetTracingInterceptor("app.config");
            string invocationId = "12345";
            string returnValue  = "bye bye!";
            string expected     = string.Format("DEBUG - Exit with invocation id {0}, the return value is {1}\r\n",
                                                invocationId, returnValue);

            logger.ExitMethod(invocationId, returnValue);
            string actual = File.ReadAllText(logFileName);

            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public void LogsNullExit()
        {
            Log4NetTracingInterceptor logger = new Log4NetTracingInterceptor("Microsoft.Rest.ClientRuntime.Tracing.Tests.dll.config");
            string invocationId = null;
            string returnValue  = null;
            string expected     = string.Format("DEBUG - Exit with invocation id {0}, the return value is {1}\r\n",
                                                invocationId, returnValue);

            logger.ExitMethod(invocationId, returnValue);
            string actual = File.ReadAllText(logFileName);

            Assert.Equal(expected, actual);
        }