In xUnit, a test is a public method marked [Fact] in a public class. Each test follows Arrange, Act, Assert: set up the inputs, call the code, and check the result with Assert.Equal(expected, actual), Assert.True, Assert.Null and friends. xUnit creates a new instance of the test class for every test, so tests cannot leak state into each other.
A [Theory] runs the same test with several rows of data, one [InlineData(...)] per row, which suits boundaries: 4999, 5000 and 5001 cents around a free-shipping threshold. Assert.Throws<T>(() => ...) checks that code throws exactly T (not a subclass) and returns the exception for further checks.
A good test fails when the code is wrong. In this lesson the checker runs your tests twice: against the correct code, where every test must pass, and against versions with a planted bug, where at least one of your tests must fail. Pick inputs that tell right from wrong: a 10% discount on 100 is 90 whether the code takes off 10% or 10 dollars.
About the code here: The xUnit test runner does not run in this browser runtime, so these exercises use a small stand-in for xUnit, with the same names and the same rules for what this lesson checks. It is a simplification: XunitRunner runs your test class the way xUnit would, a new instance per test and one run per [InlineData] row, and the Assert methods have the same names and rules. There is no test explorer, no IClassFixture and no output helper.
A fact and a theory with two rows, each with one clear assertion.