Documentation
Table of Contents

Class SpecialistContractKit

Namespace
IntentSharp.Specialist.Testing
Assembly
IntentSharp.Specialist.dll

The contract kit for specialist service adapters: runs the promises of ISpecialistService against any service and returns the problems it found, for the adapter's own tests. It needs no test framework and no client, and it calls no model. An empty list means the service kept every promise the kit checks.

public static class SpecialistContractKit
Inheritance
object
SpecialistContractKit
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

Remarks

The steps, in order, each problem starting with its step's name: request, a ticket comes back with an id and the service's name; wait, each wait answers "not yet" (null) or an offer, within its timeout, and an offer arrives within the script's waits; offer, the offer carries a definition and exactly one way to reach the specialist; again, a second wait on the same ticket answers the same offer (the same definition, provider, provider name and model); report, taking a fit report does not throw; retire, retiring the ticket does not throw; recall, only for a service that implements RecallAsync(HeldSpecialist, CancellationToken), recalling a held record of the offer does not throw and answers null or an offer that carries a definition and exactly one way to reach the specialist. A step that cannot run because an earlier one failed is skipped, and its problem says so. With RequireName, the offer step also asks for a specialist name.

Methods

RunAsync(ISpecialistService, SpecialistContractScript, CancellationToken)

Runs every step against service with script and returns the problems found.