[TestMethod]
[ExpectedException(typeof(System.IndexOutOfRangeException))]
public void TestTransformationNegative()
{
// Arrange
int[] numbers = { 10 };
var target = new LinqProjectionAccessor(new LinqProjection());
// Act
string[] numbersAsText = target.Transformation(numbers);
}
Test Name: TestTransformationNegative
Test FullName: UnitTestLinq.TestLinqProjection.TestTransformationNegative
Test Source: c:\Users\tjmadden\Source\Workspaces\Linq\UnitTestLinq\TestLinqProjection.cs : line 128
Test Outcome: Failed
Test Duration: 0:00:00.0264312
Result Message: Test method UnitTestLinq.TestLinqProjection.TestTransformationNegative threw exception System.Reflection.TargetInvocationException, but exception System.IndexOutOfRangeException was expected. Exception message: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
Result StackTrace:
at Linq.LinqProjection.<>c__DisplayClass5.[ExpectedException(typeof(System.IndexOutOfRangeException))]
public void TestTransformationNegative()
{
// Arrange
int[] numbers = { 10 };
var target = new LinqProjectionAccessor(new LinqProjection());
// Act
string[] numbersAsText = target.Transformation(numbers);
}