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:
Leila Lali
2016-11-16 11:39:48 -08:00
committed by GitHub
parent 32f6cbc304
commit c2ffd4c2a5
4 changed files with 46 additions and 48 deletions

View File

@@ -87,7 +87,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver
using (var typeInstance = (IDisposable)Activator.CreateInstance(type))
{
Console.WriteLine("Running test " + testName);
await (Task)methodInfo.Invoke(typeInstance, new object[] { testName });
await (Task)methodInfo.Invoke(typeInstance, null);
Console.WriteLine("Test ran successfully: " + testName);
}
}