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


C# MessageWriter.WriteLine方法代码示例

本文整理汇总了C#中NUnit.Framework.Constraints.MessageWriter.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# MessageWriter.WriteLine方法的具体用法?C# MessageWriter.WriteLine怎么用?C# MessageWriter.WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NUnit.Framework.Constraints.MessageWriter的用法示例。


在下文中一共展示了MessageWriter.WriteLine方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteActualValueTo

        public override void WriteActualValueTo(MessageWriter writer)
        {
            writer.WriteLine("When called with the following arguments the method did not throw the apporpriate exception:");

            foreach (var failingCall in this.state.GetFailingCallsDescriptions())
            {
                writer.Write("            ");
                writer.WriteLine(failingCall);
            }
        }
开发者ID:patrik-hagne,项目名称:FakeItEasy,代码行数:10,代码来源:NullGuardedConstraint.cs

示例2: WriteActualValueTo

        public override void WriteActualValueTo(MessageWriter writer)
        {
            writer.WriteLine();
            writer.WriteLine(actualGameRepresentation);

            writer.WriteLine();
            writer.WriteLine("  Difference:");
            actualGameRepresentation
                .ToCharArray()
                .ToList()
                .Select((c, i) => c == expectedGameRepresentation[i] ? c : '#')
                .ToList()
                .ForEach(writer.Write);
        }
开发者ID:SmartStepGroup,项目名称:ProperTests,代码行数:14,代码来源:GameConstraint.cs

示例3: WriteDescriptionTo

        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteMessageLine("Expected to find element with css selector: {0}\n", _expectedCss);
            if (exactText != null)
                writer.WriteMessageLine("With text: \"" + exactText + "\"");
            if (textPattern != null)
                writer.WriteMessageLine("With text matching: \"" + textPattern + "\"");

            writer.WriteLine("in:\n{0}",_actualContent);
        }
开发者ID:JamieBenson,项目名称:coypu,代码行数:10,代码来源:HasCssMatcher.cs

示例4: WriteActualValueTo

        /// <summary>
        /// Write the actual value for a failing constraint test to a
        /// MessageWriter. Overriden to write additional information
        /// in the case of an Exception.
        /// </summary>
        /// <param name="writer">The MessageWriter to use</param>
        public override void WriteActualValueTo(MessageWriter writer)
        {
            Exception ex = actual as Exception;
            base.WriteActualValueTo(writer);

            if (ex != null)
            {
                writer.WriteLine(" ({0})", ex.Message);
                writer.Write(ex.StackTrace);
            }
        }
开发者ID:yudhitech,项目名称:xamarin-android,代码行数:17,代码来源:ExceptionTypeConstraint.cs

示例5: WriteActualValueTo

		public override void WriteActualValueTo (MessageWriter writer)
		{
			var ex = actual as XamlParseException;
			writer.WriteActualValue ((actual == null) ? null : actual.GetType ());
			if (ex != null) {
				if (ex.XmlInfo != null && ex.XmlInfo.HasLineInfo ())
					writer.Write (" line {0}, position {1}", ex.XmlInfo.LineNumber, ex.XmlInfo.LinePosition);
				else 
					writer.Write (" no line info");
				writer.WriteLine (" ({0})", ex.Message);
				writer.Write (ex.StackTrace);
			}
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:13,代码来源:XamlParseExceptionConstraint.cs

示例6: WriteDescriptionTo

 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteLine();
     writer.WriteLine(expectedGameRepresentation);
 }
开发者ID:SmartStepGroup,项目名称:ProperTests,代码行数:5,代码来源:GameConstraint.cs

示例7: WriteActualValueTo

 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteLine(ActualValue);
 }
开发者ID:sburnicki,项目名称:CmisCmdlets,代码行数:4,代码来源:CmisTestHelper.cs

示例8: WriteDescriptionTo

 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteLine(ExpectedValue);
 }
开发者ID:sburnicki,项目名称:CmisCmdlets,代码行数:4,代码来源:CmisTestHelper.cs

示例9: WriteActualValueTo

 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteLine(" ({0})", caughtException.Message);
     writer.Write(caughtException.StackTrace);
 }
开发者ID:Invertika,项目名称:libraries,代码行数:12,代码来源:ThrowsConstraint.cs

示例10: 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


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