コード例 #1
0
ファイル: LogFormatterTests.cs プロジェクト: bocharovf/quiz
        public void FormatClientException_Always_ReturnsCorretStringRepresentation()
        {
            var formatter = new LogFormatter();
            var exception = new ClientExceptionContract()
            {
                ClientPlatform = "Chrome",
                CorrelationId  = "qc-123",
                ErrorCode      = "UNEXPECTED",
                Message        = "Test error",
                StackTrace     = "TestModule.MyFunc"
            };

            string formattedMessage = formatter.FormatClientException(exception);

            Assert.Equal("qc-123: CLIENT UNEXPECTED - Test error at TestModule.MyFunc (Chrome)", formattedMessage);
        }