public void Should_Not_Split_Abbrevations_In_Uppercase_Within_Text()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Tests.LogEntryBuilderTests.ShouldNotSplitABBREVATIONSInText");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("should not split ABBREVATIONS in text", logEntry.Test);
        }
        public void Should_LowerCase_First_Letter_If_Dash_Is_Used_For_TestClass_Names()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Tests.Log_EntryBuilder_Tests.ShouldSplitAndLowerCaseCamelCasedTestNames");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("log entryBuilder tests", logEntry.TestClass);
        }
        public void Should_Split_And_LowerCase_CamelCased_Test_Names()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Tests.LogEntryBuilderTests.ShouldSplitAndLowerCaseCamelCasedTestNames");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("should split and lower case camel cased test names", logEntry.Test);
        }
        public void Should_LowerCase_First_Letter_If_Dash_Is_Used()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Tests.LogEntryBuilderTests.Should_LowerCase_First_Letter_If_Dash_Is_Used");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("should lowerCase first letter if dash is used", logEntry.Test);
        }
        public void Should_Not_Split_CamelCase_If_Dash_Separated_Test_Names_Are_Used()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Tests.LogEntryBuilderTests.Should_Not_Split_CamelCase_If_Dash_Separated_Test_Names_Are_Used");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("should not split camelCase if dash separated test names are used", logEntry.Test);
        }
        public void Should_Handle_Ticked_Function_Names_With_Special_Characters()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Should handle ticked function names with special characters, e.g. these ones");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("Should handle ticked function names with special characters, e.g. these ones", logEntry.Test);
        }
        public void Should_Handle_Ticked_Function_Names()
        {
            var builder    = new LogEntryBuilder();
            var testResult = BuildTestResultFromDisplayName("PrettierTestLogger.Should handle ticked function names");

            var logEntry = builder.BuildLogEntry(testResult);

            Assert.Equal("Should handle ticked function names", logEntry.Test);
        }
Ejemplo n.º 8
0
        public Task Invoke(IDictionary <string, object> environment)
        {
            var lb = new LogEntryBuilder(_log);

            foreach (var key in _keys.Where(environment.ContainsKey))
            {
                lb.Data(key, environment[key]);
            }

            lb.Trace("Request");
            return(_next(environment));
        }