本文整理汇总了C#中NUnit.Framework.Constraints.MessageWriter.WriteExpectedValue方法的典型用法代码示例。如果您正苦于以下问题:C# MessageWriter.WriteExpectedValue方法的具体用法?C# MessageWriter.WriteExpectedValue怎么用?C# MessageWriter.WriteExpectedValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NUnit.Framework.Constraints.MessageWriter
的用法示例。
在下文中一共展示了MessageWriter.WriteExpectedValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteDescriptionTo
/// <summary>
/// Write the constraint description to a MessageWriter
/// </summary>
/// <param name="writer">The writer on which the description is displayed</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("String matching");
writer.WriteExpectedValue(this.expected);
if (this.caseInsensitive)
writer.WriteModifier("ignoring case");
}
示例2: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
//WritePredicateTo(writer);
writer.WriteExpectedValue(expected);
//if (ignoreCase)
// writer.Write(" ignoring case");
}
示例3: WriteDescriptionTo
/// <summary>
/// Write description of this constraint
/// </summary>
/// <param name="writer">The MessageWriter to write to</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WriteExpectedValue( expected );
if ( tolerance != null )
{
writer.WriteConnector("+/-");
writer.WriteExpectedValue(tolerance);
}
if ( this.caseInsensitive )
writer.WriteModifier("ignoring case");
}
示例4: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
if (Same)
{
writer.WriteExpectedValue(expected1);
}
else
{
writer.WritePredicate("To be between");
writer.WriteExpectedValue(expected1);
writer.Write(" and ");
writer.WriteExpectedValue(expected2);
}
}
示例5: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("equivalent XML structure to");
writer.WriteExpectedValue(expected.OuterXml);
}
示例6: WriteDescriptionTo
/// <summary>
/// Write the constraint description to a MessageWriter
/// </summary>
/// <param name="writer">The writer on which the description is displayed</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("String starting with");
writer.WriteExpectedValue( MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0) );
if ( this.caseInsensitive )
writer.WriteModifier( "ignoring case" );
}
示例7: WriteDescriptionTo
/// <summary>
/// Write a description of this constraint to a MessageWriter
/// </summary>
/// <param name="writer"></param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate( "subset of" );
writer.WriteExpectedValue(expected);
}
示例8: WriteDescriptionTo
/// <summary>
/// Write the description of this constraint to a MessageWriter
/// </summary>
/// <param name="writer">The MessageWriter to use</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WriteExpectedValue(expectedType);
}
示例9: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WriteExpectedValue("<nothing>");
}
示例10: WriteDescriptionTo
/// <summary>
/// Write the constraint description to a MessageWriter
/// </summary>
/// <param name="writer">The writer on which the description is displayed</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate( "Property \"" + name + "\" equal to" );
writer.WriteExpectedValue( expected );
}
示例11: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("headers containing");
writer.WriteExpectedValue(_expectedItems);
}
示例12: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WriteExpectedValue(_expectedValue);
if (_context != null)
writer.WriteMessageLine("In " + _context);
}
示例13: WriteDescriptionTo
public override void WriteDescriptionTo(MessageWriter writer)
{
if (actual == null)
{
writer.WriteMessageLine("Actual value does not have a meta table.");
}
else if (_typeMismatch)
{
writer.WriteMessageLine("Meta entry type doesn't match.");
writer.WriteExpectedValue(_expectedEntry.EntryType);
writer.WriteActualValue(_actualEntry.EntryType);
}
else
{
writer.WriteMessageLine(
"actual meta entry {0} should match expected entry {1}", _actualEntry,
_expectedEntry);
}
}
示例14: WriteDescriptionTo
/// <summary>
/// Write a description of the constraint to a MessageWriter
/// </summary>
/// <param name="writer"></param>
public override void WriteDescriptionTo(MessageWriter writer)
{
if (Request != null)
{
writer.WritePredicate(string.Format("On perspective \"{0}\", {1} "
, Request.Perspective
, GetPredicate()));
writer.WriteExpectedValue(ExpectedItems);
var info = new ListComparisonFormatter()
.Format
(
new ListComparer()
.Compare
(
((MemberResult)actual).ToCaptions()
, ExpectedItems
, GetComparisonType()
).Sample()
);
writer.WriteLine(info.ToString());
}
}
示例15: WriteDescriptionTo
/// <summary>
/// Write a description of this constraint to a MessageWriter
/// </summary>
/// <param name="writer">The MessageWriter to use</param>
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("instance of");
writer.WriteExpectedValue(expectedType);
}