Mocker..::..Strict Property

Gets or sets a value indicating whether this Mocker is strict. Strict prevents certain features for automatically assuming or substituting preconfigured objects such as IFileSystem and HttpClient. Strict prevents private methods from being used during an invoke if public was requested. Not strict would mean that private methods may be substituted if the public methods are not found. Strict prevents private constructors from being used during object creation if public was requested. Not strict would mean that private constructors may be substituted if the public constructors are not found. Strict sets the MockBehavior option.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public bool Strict { get; set; }
Public Property Strict As Boolean
	Get
	Set
public:
property bool^ Strict {
	bool^ get ();
	void set (bool^ value);
}

Field Value

true if strict IFileSystem and HttpClient resolution; otherwise, false uses the built-in virtual MockFileSystem.

Remarks


If strict, the mock IFileSystem does not use MockFileSystem and uses Mock of IFileSystem. Gets or sets a value indicating whether this Mocker is strict. If strict, the mock HttpClient does not use the pre-built HttpClient and uses Mock of HttpClient.