C# Class MbDotNet.MountebankClient

Inheritance: IClient
Afficher le fichier Open project: mattherman/MbDotNet

Méthodes publiques

Méthode Description
CreateHttpImposter ( int port, string name = null ) : HttpImposter

Creates a new imposter on the specified port with the HTTP protocol. The Submit method must be called on the client in order to submit the imposter to mountebank.

CreateTcpImposter ( int port, string name = null, TcpMode mode = TcpMode.Text ) : TcpImposter

Creates a new imposter on the specified port with the TCP protocol. The Submit method must be called on the client in order to submit the imposter to mountebank.

DeleteAllImposters ( ) : void

Deletes all imposters from mountebank. Will also remove the imposter from the collection of imposters that the client maintains.

DeleteImposter ( int port ) : void

Deletes a single imposter from mountebank. Will also remove the imposter from the collection of imposters that the client maintains.

GetImposter ( int port ) : RetrievedImposter
MountebankClient ( ) : System.Collections.Generic
MountebankClient ( string mountebankUrl ) : System.Collections.Generic
Submit ( ICollection imposters ) : void

Submits all pending imposters from the supplied collection to be created in mountebank. Will throw a MountebankException if unable to create the imposter for any reason.

Submit ( Imposter imposter ) : void

Submits imposter if pending to be created in mountebank. Will throw a MountebankException if unable to create the imposter for any reason.

Private Methods

Méthode Description
MountebankClient ( IRequestProxy requestProxy ) : System.Collections.Generic

Method Details

CreateHttpImposter() public méthode

Creates a new imposter on the specified port with the HTTP protocol. The Submit method must be called on the client in order to submit the imposter to mountebank.
public CreateHttpImposter ( int port, string name = null ) : HttpImposter
port int The port the imposter will be set up to receive requests on
name string The name the imposter will recieve, useful for debugging/logging purposes
Résultat MbDotNet.Models.Imposters.HttpImposter

CreateTcpImposter() public méthode

Creates a new imposter on the specified port with the TCP protocol. The Submit method must be called on the client in order to submit the imposter to mountebank.
public CreateTcpImposter ( int port, string name = null, TcpMode mode = TcpMode.Text ) : TcpImposter
port int The port the imposter will be set up to receive requests on
name string The name the imposter will recieve, useful for debugging/logging purposes
mode TcpMode The mode of the imposter, text or binary. This defines the encoding for request/response data
Résultat MbDotNet.Models.Imposters.TcpImposter

DeleteAllImposters() public méthode

Deletes all imposters from mountebank. Will also remove the imposter from the collection of imposters that the client maintains.
public DeleteAllImposters ( ) : void
Résultat void

DeleteImposter() public méthode

Deletes a single imposter from mountebank. Will also remove the imposter from the collection of imposters that the client maintains.
public DeleteImposter ( int port ) : void
port int The port number of the imposter to be removed
Résultat void

GetImposter() public méthode

public GetImposter ( int port ) : RetrievedImposter
port int
Résultat MbDotNet.Models.Imposters.RetrievedImposter

MountebankClient() public méthode

public MountebankClient ( ) : System.Collections.Generic
Résultat System.Collections.Generic

MountebankClient() public méthode

public MountebankClient ( string mountebankUrl ) : System.Collections.Generic
mountebankUrl string
Résultat System.Collections.Generic

Submit() public méthode

Submits all pending imposters from the supplied collection to be created in mountebank. Will throw a MountebankException if unable to create the imposter for any reason.
public Submit ( ICollection imposters ) : void
imposters ICollection
Résultat void

Submit() public méthode

Submits imposter if pending to be created in mountebank. Will throw a MountebankException if unable to create the imposter for any reason.
public Submit ( Imposter imposter ) : void
imposter MbDotNet.Models.Imposters.Imposter
Résultat void