Class EmptyStringBehaviorExpectation

Namespace: AutoFixture.Idioms
Assembly: AutoFixture.Idioms.dll

Encapsulates the expected behavior when an IGuardClauseCommand (typically representing a method or constructor) is invoked with a Empty argument.

public class EmptyStringBehaviorExpectation : IBehaviorExpectation

Inheritance

objectEmptyStringBehaviorExpectation

Implements

IBehaviorExpectation

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

EmptyStringBehaviorExpectation()

public EmptyStringBehaviorExpectation()

Methods

Verify(IGuardClauseCommand)

Verifies the behavior of the command when invoked with Empty.

public void Verify(IGuardClauseCommand command)

Parameters

command IGuardClauseCommand

The command whose behavior must be examined.

Remarks

This method encapsulates the behavior which is expected when a method or constructor is invoked with `Empty` as one of the method arguments. In that case it's expected that invoking command with string.Empty throws an `ArgumentException`, causing the Verify method to succeed. If other exceptions are thrown, or no exception is thrown when invoking the command, the Verify method throws an exception.

See Also

EmptyStringBehaviorExpectation.Verify(IGuardClauseCommand)