C# Класс MbDotNet.MountebankClient

Наследование: IClient
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
MountebankClient ( IRequestProxy requestProxy ) : System.Collections.Generic

Описание методов

CreateHttpImposter() публичный Метод

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
Результат MbDotNet.Models.Imposters.HttpImposter

CreateTcpImposter() публичный Метод

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
Результат MbDotNet.Models.Imposters.TcpImposter

DeleteAllImposters() публичный Метод

Deletes all imposters from mountebank. Will also remove the imposter from the collection of imposters that the client maintains.
public DeleteAllImposters ( ) : void
Результат void

DeleteImposter() публичный Метод

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
Результат void

GetImposter() публичный Метод

public GetImposter ( int port ) : RetrievedImposter
port int
Результат MbDotNet.Models.Imposters.RetrievedImposter

MountebankClient() публичный Метод

public MountebankClient ( ) : System.Collections.Generic
Результат System.Collections.Generic

MountebankClient() публичный Метод

public MountebankClient ( string mountebankUrl ) : System.Collections.Generic
mountebankUrl string
Результат System.Collections.Generic

Submit() публичный Метод

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
Результат void

Submit() публичный Метод

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
Результат void