Skip to content

Xunit Support Classes

Dennis C. Mitchell edited this page Apr 2, 2019 · 19 revisions

EDennis.AspNetCore.Base provides a number of abstract Xunit test classes and supporting classes for performing various kinds of Xunit integration tests. There are four broad categories of integration tests supported: (1) Repo Tests, which directly test repo class methods; (2) Controller Tests, which directly test controller methods (actions); (3) ApiClient Tests, which directly test ApiClient methods; and (4) Endpoint Tests, which test an API endpoint. Only the Endpoint Tests make use of the Microsoft's WebApplicationFactory. All other tests use special factory classes that do not derive from WebApplicationFactory.

Repo Tests

ReadonlyRepoTests Class

ReadonlyTemporalRepoTests Class

WriteableRepoTests Class

WriteableTemporalRepoTests Class

Controller Tests

TestRepoFactory Class

TestApiClientFactory Class

ApiClient Tests

ReadonlyApiClientTests Class

WriteableApiClientTests Class

Endpoint Tests

ReadonlyEndpointTests Class

ReadonlyTemporalEndpointTests Class

WriteableEndpointTests Class

WriteableTemporalEndpointTests Class

Other Factory and Support Classes

ConfigurationFactory Class

ConfiguringWebApplicationFactory Class

ApiLauncherFactory Class

TestHttpClientFactory Class

ClassInfo Class

Clone this wiki locally