当前位置: 首页>>代码示例>>C#>>正文


C# MessageWriter.WriteExpectedValue方法代码示例

本文整理汇总了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");
 }
开发者ID:pjcollins,项目名称:Andr.Unit,代码行数:11,代码来源:RegexConstraint.cs

示例2: WriteDescriptionTo

 public override void WriteDescriptionTo(MessageWriter writer)
 {
     //WritePredicateTo(writer);
     writer.WriteExpectedValue(expected);
     //if (ignoreCase)
     //    writer.Write(" ignoring case");
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:7,代码来源:StringConstraints.cs

示例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");
        }
开发者ID:Xarlot,项目名称:Xunit.StaFact,代码行数:17,代码来源:EqualConstraint.cs

示例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);
     }
 }
开发者ID:jbijlsma,项目名称:KarmaTestAdapter,代码行数:14,代码来源:BetweenConstraint.cs

示例5: WriteDescriptionTo

		public override void WriteDescriptionTo(MessageWriter writer)
		{
			writer.WritePredicate("equivalent XML structure to");
			writer.WriteExpectedValue(expected.OuterXml);
		}
开发者ID:AllEmpty,项目名称:Core,代码行数:5,代码来源:XmlEquivalent.cs

示例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" );
		}
开发者ID:gezidan,项目名称:ZYSOCKET,代码行数:11,代码来源:StringConstraints.cs

示例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);
 }
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:CollectionConstraints.cs

示例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);
 }
开发者ID:NameNIL,项目名称:iOS4Unity,代码行数:8,代码来源:ExactTypeConstraint.cs

示例9: WriteDescriptionTo

		public override void WriteDescriptionTo(MessageWriter writer)
		{
			writer.WriteExpectedValue("<nothing>");
		}
开发者ID:TargetProcess,项目名称:Target-Process-Plugins,代码行数:4,代码来源:NothingConstraint.cs

示例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 );
 }
开发者ID:fotisp,项目名称:conqat,代码行数:9,代码来源:PropertyConstraint.cs

示例11: WriteDescriptionTo

 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("headers containing");
     writer.WriteExpectedValue(_expectedItems);
 }
开发者ID:vtex,项目名称:workspaces-client-net,代码行数:5,代码来源:HeadersContainItemsConstraint.cs

示例12: WriteDescriptionTo

        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteExpectedValue(_expectedValue);

            if (_context != null)
                writer.WriteMessageLine("In " + _context);
        }
开发者ID:jinjingcai2014,项目名称:il-repack,代码行数:7,代码来源:BamlDocumentMatcher.cs

示例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);
     }
 }
开发者ID:SealedSun,项目名称:prx,代码行数:19,代码来源:Meta.cs

示例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());
            }
        }
开发者ID:zyh329,项目名称:nbi,代码行数:28,代码来源:AbstractMembersCollectionConstraint.cs

示例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);
 }
开发者ID:karun10,项目名称:KML2SQL,代码行数:9,代码来源:TypeConstraints.cs


注:本文中的NUnit.Framework.Constraints.MessageWriter.WriteExpectedValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。