Skip to content

Feature: Double down on file based C# projects #2536

@fubar-coder

Description

@fubar-coder

I just saw the PR #2519 and there are several things that would improve the experience:

  1. Add a <Using Include="TUnit" /> to a TUnit-provided *.props file
  2. Allow the specification of [Test] functions in the "global" scope

This would allow the usage of TUnit as follows:

#:package TUnit@0.*

[Test]
void Basic()
{
    Console.WriteLine("This is a basic test");
}

[Test]
[Arguments(1, 2, 3)]
[Arguments(2, 3, 5)]
async Task DataDrivenArguments(int a, int b, int c)
{
    Console.WriteLine("This one can accept arguments from an attribute");
    var result = a + b;
    await Assert.That(result).IsEqualTo(c);
}

I do not know whether 2) is possible, but 1) should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions