# \[Theory\]

An xUnit a unit test with input parameters.

## Define **[Theory]**

In xUnit **[Theory]** creates a unit test with input parameters. The inputs are defined using **[InlineData]**.

```csharp
[Theory]
[InlineData(100, 108)]
[InlineData(0, 0)]
public void WithTax_AddsEightPercent(decimal price, decimal expected) =>
    Assert.Equal(expected, PriceCalculator.WithTax(price));
```

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/journeyman)

Updated: October 12, 2026

Source: https://www.ask-codey.com/glossary/theory
