UNPKG

alsatian-fluent-assertions

Version:

Fluent assertions extension to Alsatian xUnit framework.

26 lines (25 loc) 1.24 kB
import { IFluentCore } from "./matchers"; import { AssertionContext, ConfiguredAssert } from "./types"; declare function Assert<T, TNext>(value?: T, ctxt?: AssertionContext): IFluentCore<T, TNext, void>; declare namespace Assert { /** * Fails the test with the given message * @param message - the message that will be shown in the failure */ function fail(message: string): void; /** * Not yet used. Configures an Assert factory for spec-aware assertions. For example, * it allows the test framework to alert you when you forgot to complete * an assertion (i.e., this.assert(something) and forgetting .equals(...)). * @param container The specification container instance. */ function configure(ctxt: AssertionContext): ConfiguredAssert; /** * Validates any assertions within the current context. Intended to be used * in conjuction with Assert.configure (in @Setup/@AsyncSetup) inside of a * @Teardown or @AsyncTeardown method. If a specification class extends BaseSpec, * then configuration and validation will be called automatically. */ function validateAssertions(ctxt: AssertionContext): void; } export { Assert };