-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitTest7.cs
More file actions
26 lines (23 loc) · 797 Bytes
/
UnitTest7.cs
File metadata and controls
26 lines (23 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MSTestTestContextIssues
{
[TestClass]
public class UnitTest7
{
public TestContext TestContext { get; set; }
[TestMethod]
public void TestMethod1()
{
var text = $"{this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod()?.Name}";
System.Console.WriteLine($"Std: {text}");
TestContext.WriteLine($"TC: {text}");
}
[TestMethod]
public void TestMethod2()
{
var text = $"{this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod()?.Name}";
System.Console.WriteLine($"Std: {text}");
TestContext.WriteLine($"TC: {text}");
}
}
}