NUnit.Framework.AssertionFailureMessage.FormatObjectForDisplay(object)

Here are the examples of the csharp api class NUnit.Framework.AssertionFailureMessage.FormatObjectForDisplay(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

6 Examples 7

1. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayActualValue( object actual )
		{
			AddActualLine( FormatObjectForDisplay( actual ) );
		}

2. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayExpectedValue( object expected )
		{
			AddExpectedLine( FormatObjectForDisplay( expected ) );
		}

3. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayActualValue( object actual )
		{
			AddActualLine( FormatObjectForDisplay( actual ) );
		}

4. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayExpectedValue( object expected )
		{
			AddExpectedLine( FormatObjectForDisplay( expected ) );
		}

5. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayListElements( string label, IList list, int index, int max )
		{
			AddLine( "{0}<", label );

			if ( list == null )
				Write( "null" );
			else if ( list.Count == 0 )
				Write( "empty" );
			else
			{
				for( int i = 0; i < max && index < list.Count; i++ )
				{
					Write( FormatObjectForDisplay( list[index++] ) );
				
					if ( index < list.Count )
						Write( "," );
				}

				if ( index < list.Count )
					Write( "..." );
			}

			Write( ">" );
		}

6. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayListElements( string label, IList list, int index, int max )
		{
			AddLine( "{0}<", label );

			if ( list == null )
				Write( "null" );
			else if ( list.Count == 0 )
				Write( "empty" );
			else
			{
				for( int i = 0; i < max && index < list.Count; i++ )
				{
					Write( FormatObjectForDisplay( list[index++] ) );
				
					if ( index < list.Count )
						Write( "," );
				}

				if ( index < list.Count )
					Write( "..." );
			}

			Write( ">" );
		}