NUnit.Framework.AssertionFailureMessage.DisplayListElements(string, System.Collections.IList, int, int)

Here are the examples of the csharp api class NUnit.Framework.AssertionFailureMessage.DisplayListElements(string, System.Collections.IList, int, int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayArrayDifferences( Array expected, Array actual, int index )
		{
			if( expected.Length != actual.Length )
				AddLine( diffArrayLengthsFmt, expected.Length, actual.Length );
			else
				AddLine( sameArrayLengthsFmt, expected.Length );
			
			AddLine( arraysDifferAtIndexFmt, index );
				
			if ( index < expected.Length && index < actual.Length )
				DisplayDifferences( expected.GetValue( index ), actual.GetValue( index ), false );
			else if( expected.Length < actual.Length )
				DisplayListElements( "   extra:", actual, index, 3 );
			else
				DisplayListElements( " missing:", expected, index, 3 );
		}

2. Example

Project: 32feet
Source File: AssertionFailureMessage.cs
View license
public void DisplayArrayDifferences( Array expected, Array actual, int index )
		{
			if( expected.Length != actual.Length )
				AddLine( diffArrayLengthsFmt, expected.Length, actual.Length );
			else
				AddLine( sameArrayLengthsFmt, expected.Length );
			
			AddLine( arraysDifferAtIndexFmt, index );
				
			if ( index < expected.Length && index < actual.Length )
				DisplayDifferences( expected.GetValue( index ), actual.GetValue( index ), false );
			else if( expected.Length < actual.Length )
				DisplayListElements( "   extra:", actual, index, 3 );
			else
				DisplayListElements( " missing:", expected, index, 3 );
		}