mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 17:23:38 -05:00
Setting the test name in the property in the class (#147)
Using CallerMemberName attribute to get the test name for generating the test result instead of having a name passed as a parameter for each test method
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Utility
|
||||
{
|
||||
@@ -43,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Utility
|
||||
EndDateTime = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public void EndAndPrint(string testName)
|
||||
public void EndAndPrint([CallerMemberName] string testName = "")
|
||||
{
|
||||
End();
|
||||
var currentColor = Console.ForegroundColor;
|
||||
|
||||
Reference in New Issue
Block a user