Add tests for MethodInfo.Invoke with default parameters
authorvitek-karas <vitek.karas@microsoft.com>
Tue, 12 Jul 2016 11:06:53 +0000 (04:06 -0700)
committervitek-karas <vitek.karas@microsoft.com>
Tue, 12 Jul 2016 21:20:05 +0000 (14:20 -0700)
commit5b8b0ebd57738b8909590ec1e0f8f8b16ef39383
tree9e924bf4330c5921931ed97188b3491d02bb0b64
parent7abe610d154d4061b214c2e16eb6ab1a00869032
Add tests for MethodInfo.Invoke with default parameters

Add tests for various cases where MethodInfo.Invoke is used on a method with default parameters.

General cleanup of the affected test file
- Renamed test methods to include what they're actually testing (instead of numbering scheme).
- Use Assert.Equal instead of custom implementation based on Assert.True (less code).
- Get rid of lot of local variables which are not that useful - if we debug this we would
  step into the Invoke call anyway, and that has all the important stuff as parameters anyway.
  Keeps the tests much shorter and easier to read.
- I didn't change the actual behavior of any of the existing tests.
- For now I kept the test types as they are (although the names are pretty bad).
- Small formatting changes.

Commit migrated from https://github.com/dotnet/corefx/commit/d93ce9416a40f0aa18d6a50eeaab3e84597aebc1
src/libraries/System.Reflection/tests/MethodInfo/MethodInfo_InvokeTests.cs