public static TcpStump WhenLengthIsEqualTo(this TcpStump stump, int value) { stump.AddRule(new MessageLengthRule(LengthEvaluation.EqualToValue, value)); return(stump); }
public static TcpStump WhenMessageContainsBytesBeforePosition(this TcpStump stump, byte[] messageSegment, int position) { stump.AddRule(new ContainsBytesRule(messageSegment, BytesPlacement.BeforePosition, position)); return(stump); }
public static TcpStump WhenMessageContainsBytes(this TcpStump stump, byte[] messageSegment) { stump.AddRule(new ContainsBytesRule(messageSegment)); return(stump); }
public static TcpStump WhenMessageIsAnything(this TcpStump stump) { stump.AddRule(new AnyMessageRule()); return(stump); }
public static TcpStump WhenLengthIsLessThan(this TcpStump stump, int value) { stump.AddRule(new MessageLengthRule(LengthEvaluation.LessThanValue, value)); return(stump); }
public static IStumpResponseFactory RespondsWithMultipleOptions(this TcpStump stump, ResponseFactoryBehavior behavior) { stump.Responses = stump.Responses ?? new StumpResponseFactory(behavior); return(stump.Responses); }
public static IStumpResponseFactory RespondWith(this TcpStump stump) { return(stump.Responses); }