MetalamaAPI documentationAdvanced APIMetalama.​Testing.​Unit­Testing
Open sandboxFocus

Metalama.Testing.UnitTesting Namespace

Classes

TestCompilationFactory

Utility class that creates a Microsoft.CodeAnalysis.CSharp.CSharpCompilation.

TestContext

A context in which a Metalama unit test can run, configured with most required Metalama services and optionally some mocks.

TestContextOptions

Options that influence the CreateTestContext(TestContextOptions, IAdditionalServiceCollection) method.

UnitTestClass

A base class for all Metalama unit tests that require Metalama services. Exposes a CreateTestContext(IAdditionalServiceCollection) that creates a context with all services. The next step is typically to call one of the methods or properties of the returned TestContext.