/// <summary> /// Returns a new DictionaryContainsKeyValuePairConstraint checking for the /// presence of a particular key-value-pair in the dictionary. /// </summary> public DictionaryContainsKeyValuePairConstraint WithValue(object expectedValue) { var builder = this.Builder; if (builder == null) { builder = new ConstraintBuilder(); builder.Append(this); } var constraint = new DictionaryContainsKeyValuePairConstraint(Expected, expectedValue); builder.Append(constraint); return(constraint); }
/// <summary> /// Appends an operator to the expression and returns the /// resulting expression itself. /// </summary> public ConstraintExpression Append(ConstraintOperator op) { builder.Append(op); return(this); }