Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add integration tests for NotDiscoverableAttribute
  • Loading branch information
thomhurst committed Dec 23, 2025
commit d321747c3fc20350f29571da590d302208fa7295
40 changes: 40 additions & 0 deletions TUnit.TestProject/NotDiscoverableTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace TUnit.TestProject;

public class NotDiscoverableTests
{
[Test]
[NotDiscoverable]
public void Test_WithNotDiscoverable_ShouldNotAppearInDiscovery()
{
// This test should execute but not appear in test explorer
}

[Test]
[NotDiscoverable("Infrastructure test")]
public void Test_WithNotDiscoverableAndReason_ShouldNotAppearInDiscovery()
{
// This test should execute but not appear in test explorer
}

[Test]
public void Test_WithoutNotDiscoverable_ShouldAppearInDiscovery()
{
// This test should appear normally in test explorer
}
}

[NotDiscoverable]
public class NotDiscoverableClassTests
{
[Test]
public void Test_InNotDiscoverableClass_ShouldNotAppearInDiscovery()
{
// All tests in this class should be hidden from discovery
}

[Test]
public void AnotherTest_InNotDiscoverableClass_ShouldNotAppearInDiscovery()
{
// All tests in this class should be hidden from discovery
}
}