diff --git a/test/Microsoft.TemplateEngine.Mocks/MockInstallerFactory.cs b/test/Microsoft.TemplateEngine.Mocks/MockInstallerFactory.cs index 667f5d08560..c82ae1fd659 100644 --- a/test/Microsoft.TemplateEngine.Mocks/MockInstallerFactory.cs +++ b/test/Microsoft.TemplateEngine.Mocks/MockInstallerFactory.cs @@ -9,7 +9,7 @@ namespace Microsoft.TemplateEngine.Mocks { public class MockInstallerFactory : IInstallerFactory { - private Guid _factoryId = new Guid("00000000-0000-0000-0000-000000000000"); + private readonly Guid _factoryId = new Guid("00000000-0000-0000-0000-000000000000"); public string Name => "MockInstallerFactory"; diff --git a/test/Microsoft.TemplateEngine.TestHelper/XunitLoggerProvider.cs b/test/Microsoft.TemplateEngine.TestHelper/XunitLoggerProvider.cs index b7a78be1a14..7513fa2014c 100644 --- a/test/Microsoft.TemplateEngine.TestHelper/XunitLoggerProvider.cs +++ b/test/Microsoft.TemplateEngine.TestHelper/XunitLoggerProvider.cs @@ -78,7 +78,7 @@ public void Log( var firstLinePrefix = $"| [{timestamp}] {_category} {logLevel}: "; var lines = formatter(state, exception).Split(NewLineChars, StringSplitOptions.RemoveEmptyEntries); - messageBuilder.AppendLine(firstLinePrefix + lines.FirstOrDefault() ?? string.Empty); + messageBuilder.AppendLine(firstLinePrefix + (lines.FirstOrDefault() ?? string.Empty)); var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1); foreach (var line in lines.Skip(1))