You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Xunit;
namespace TestTest
{
public class Test
{
[Fact]
public void Should_hit_breakpoint_and_it_does()
{
System.Console.WriteLine("Should hit, and it does");
}
public class NestedTest
{
[Fact]
public void Should_hit_breakpoint_but_does_not()
{
System.Console.WriteLine("Should hit, but does not");
}
}
}
}
Run dotnet restore
Set breakpoint to System.Console.WriteLine in Test.cs
Run "debug test" on both
Expected behavior
Debug test
Both breakpoints are hit
Run test
Running test TestTest.Test.Should_hit_breakpoint_and_it_does...
Test passed
Running test TestTest.Test.NestedTest.Should_hit_breakpoint_but_does_not...
Test passed
Actual behavior
Debug test
Only Should_hit_breakpoint_and_it_does break point is hit, while 'Should_hit_breakpoint_but_does_not' is not
Run test
Running test TestTest.Test.Should_hit_breakpoint_and_it_does...
Test passed
Running test TestTest.Test.NestedTest.Should_hit_breakpoint_but_does_not...
The text was updated successfully, but these errors were encountered:
It is not possible to use a unit test structure like the one suggested by Phil Haack, combined with VS Code 'run test' or 'debug 'test'.
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64
VS Code version:
C# Extension version: 1.4.1
Steps to reproduce
System.Console.WriteLine
in Test.csExpected behavior
Debug test
Both breakpoints are hit
Run test
Actual behavior
Debug test
Only
Should_hit_breakpoint_and_it_does
break point is hit, while 'Should_hit_breakpoint_but_does_not' is notRun test
The text was updated successfully, but these errors were encountered: