From cc38726ec83c66ee3c58fb848149d6004d9329e6 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Tue, 13 Jan 2015 14:06:09 -0800 Subject: [PATCH] LoggerExtensions can take in param objects[] instead of param string[] --- test/E2ETests/Common/DeploymentUtility.cs | 12 ++++++------ test/E2ETests/Common/IISApplication.cs | 2 +- test/E2ETests/NtlmAuthentationTest.cs | 8 ++++---- test/E2ETests/PublishAndRunTests.cs | 8 ++++---- test/E2ETests/SmokeTests.cs | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/E2ETests/Common/DeploymentUtility.cs b/test/E2ETests/Common/DeploymentUtility.cs index 8af0246ef2..584700ac1e 100644 --- a/test/E2ETests/Common/DeploymentUtility.cs +++ b/test/E2ETests/Common/DeploymentUtility.cs @@ -200,7 +200,7 @@ namespace E2ETests }; var hostProcess = Process.Start(startInfo); - logger.WriteInformation("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id.ToString()); + logger.WriteInformation("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id); Thread.Sleep(5 * 1000); //Clear the appbase so that it does not create issues with successive runs @@ -245,7 +245,7 @@ namespace E2ETests }; var hostProcess = Process.Start(startInfo); - logger.WriteInformation("Started iisexpress. Process Id : {0}", hostProcess.Id.ToString()); + logger.WriteInformation("Started iisexpress. Process Id : {0}", hostProcess.Id); return hostProcess; } @@ -269,7 +269,7 @@ namespace E2ETests try { - logger.WriteInformation("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id.ToString()); + logger.WriteInformation("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id); } catch (Win32Exception win32Exception) { @@ -332,7 +332,7 @@ namespace E2ETests Path.Combine(startParameters.PackedApplicationRootPath, "wwwroot") : Path.Combine(startParameters.PackedApplicationRootPath, "approot", "src", "MusicStore"); - logger.WriteInformation("kpm pack finished with exit code : {0}", hostProcess.ExitCode.ToString()); + logger.WriteInformation("kpm pack finished with exit code : {0}", hostProcess.ExitCode); } //In case of self-host application activation happens immediately unlike iis where activation happens on first request. @@ -397,11 +397,11 @@ namespace E2ETests hostProcess.WaitForExit(5 * 1000); if (!hostProcess.HasExited) { - logger.WriteWarning("Unable to terminate the host process with process Id '{0}", hostProcess.Id.ToString()); + logger.WriteWarning("Unable to terminate the host process with process Id '{0}", hostProcess.Id); } else { - logger.WriteInformation("Successfully terminated host process with process Id '{0}'", hostProcess.Id.ToString()); + logger.WriteInformation("Successfully terminated host process with process Id '{0}'", hostProcess.Id); } } else diff --git a/test/E2ETests/Common/IISApplication.cs b/test/E2ETests/Common/IISApplication.cs index 14c500a8de..47168a0c63 100644 --- a/test/E2ETests/Common/IISApplication.cs +++ b/test/E2ETests/Common/IISApplication.cs @@ -59,7 +59,7 @@ namespace E2ETests } applicationPool.Enable32BitAppOnWin64 = (_startParameters.KreArchitecture == KreArchitecture.x86); _logger.WriteInformation("Created {0} application pool '{1}' with runtime version '{2}'.", - _startParameters.KreArchitecture.ToString(), applicationPool.Name, + _startParameters.KreArchitecture, applicationPool.Name, applicationPool.ManagedRuntimeVersion ?? "default"); return applicationPool; } diff --git a/test/E2ETests/NtlmAuthentationTest.cs b/test/E2ETests/NtlmAuthentationTest.cs index 5c822ab66b..222e00ebb4 100644 --- a/test/E2ETests/NtlmAuthentationTest.cs +++ b/test/E2ETests/NtlmAuthentationTest.cs @@ -20,7 +20,7 @@ namespace E2ETests using (_logger.BeginScope("NtlmAuthenticationTest")) { _logger.WriteInformation("Variation Details : HostType = {0}, KreFlavor = {1}, Architecture = {2}, applicationBaseUrl = {3}", - serverType.ToString(), kreFlavor.ToString(), architecture.ToString(), applicationBaseUrl); + serverType, kreFlavor, architecture, applicationBaseUrl); _startParameters = new StartParameters { @@ -64,7 +64,7 @@ namespace E2ETests }, logger: _logger); _logger.WriteInformation("[Time]: Approximate time taken for application initialization : '{0}' seconds", - (initializationCompleteTime - testStartTime).TotalSeconds.ToString()); + (initializationCompleteTime - testStartTime).TotalSeconds); VerifyHomePage(response, responseContent, true); @@ -75,8 +75,8 @@ namespace E2ETests AccessStoreWithPermissions(); var testCompletionTime = DateTime.Now; - _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds.ToString()); - _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds.ToString()); + _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds); + _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds); testSuccessful = true; } finally diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index 4c8b7db845..048d51bd6a 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -41,7 +41,7 @@ namespace E2ETests using (_logger.BeginScope("Publish_And_Run_Tests")) { _logger.WriteInformation("Variation Details : HostType = {0}, KreFlavor = {1}, Architecture = {2}, applicationBaseUrl = {3}", - serverType.ToString(), kreFlavor.ToString(), architecture.ToString(), applicationBaseUrl); + serverType, kreFlavor, architecture, applicationBaseUrl); _startParameters = new StartParameters { @@ -84,7 +84,7 @@ namespace E2ETests }, logger: _logger); _logger.WriteInformation("[Time]: Approximate time taken for application initialization : '{0}' seconds", - (initializationCompleteTime - testStartTime).TotalSeconds.ToString()); + (initializationCompleteTime - testStartTime).TotalSeconds); VerifyHomePage(response, responseContent, true); @@ -100,8 +100,8 @@ namespace E2ETests } var testCompletionTime = DateTime.Now; - _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds.", (testCompletionTime - initializationCompleteTime).TotalSeconds.ToString()); - _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds.", (testCompletionTime - testStartTime).TotalSeconds.ToString()); + _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds.", (testCompletionTime - initializationCompleteTime).TotalSeconds); + _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds.", (testCompletionTime - testStartTime).TotalSeconds); testSuccessful = true; } finally diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs index 5dded0511d..4299785f0c 100644 --- a/test/E2ETests/SmokeTests.cs +++ b/test/E2ETests/SmokeTests.cs @@ -92,7 +92,7 @@ namespace E2ETests using (_logger.BeginScope("SmokeTestSuite")) { _logger.WriteInformation("Variation Details : HostType = {0}, KreFlavor = {1}, Architecture = {2}, applicationBaseUrl = {3}", - serverType.ToString(), kreFlavor.ToString(), architecture.ToString(), applicationBaseUrl); + serverType, kreFlavor, architecture, applicationBaseUrl); _startParameters = new StartParameters { @@ -139,7 +139,7 @@ namespace E2ETests }, logger: _logger); _logger.WriteInformation("[Time]: Approximate time taken for application initialization : '{0}' seconds", - (initializationCompleteTime - testStartTime).TotalSeconds.ToString()); + (initializationCompleteTime - testStartTime).TotalSeconds); VerifyHomePage(response, responseContent); @@ -222,8 +222,8 @@ namespace E2ETests LoginWithMicrosoftAccount(); var testCompletionTime = DateTime.Now; - _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds.ToString()); - _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds.ToString()); + _logger.WriteInformation("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds); + _logger.WriteInformation("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds); testSuccessful = true; } finally