SubMain - CodeIt.Right The First Time!

/Community

Support Community for SubMain Products
 Home Products Services Download Purchase Support
in Search
 
Home Forums Blogs Tutorials/CIR Tutorials/GD Downloads
Welcome to SubMain Community Sign in | Join | Help

Test cases with array parameter

Last post 06-22-2011, 12:57 PM by cthomas5. 0 replies.
Sort Posts: Previous Next
  •  06-22-2011, 12:57 PM 1770

    Test cases with array parameter

    Test cases that have array parameters do not show up as individual test cases in the test results window.

    If you run the test from the code below, only one test result will show in the test results window. It appears that the individual cases are actually executed, they just don't show up in the test results.

    [TestFixture]
    public class DemoTest
    {
    private static IEnumerable<object> ArraySource()
    {
    yield return new object[] { new[] { true }, new byte[] { 1 } };
    yield return new object[] { new[] { false }, new byte[] { 0 } };
    yield return new object[] { new[] { true, false }, new byte[] { 1, 0 } };
    }

    [TestCaseSource("ArraySource")]
    public void Array(bool[] values, byte[] result)
    {
    }
    }

View as RSS news feed in XML
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |