Commit Graph
9 Commits
Author SHA1 Message Date
vitek-karas be1fa5f23d Add delegate and MethodInfo invoke special case tests for optional parameters and args handling.
Adds the same set of tests for both MethodInfo.Invoke and
Delegate.DynamicInvoke.
- Tests around optional parameters and the behavior when passing Missing
as a value for it.
- Tests around handling of the arguments to the invoke method, it should
be able to consume arrays convertible to object[].


Commit migrated from https://github.com/dotnet/corefx/commit/6681e3cf43437a90d5fad72db11daf536675bc6d
2016-07-14 08:31:50 -07:00
vitek-karas 5b8b0ebd57 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
2016-07-12 14:20:05 -07:00
Amy Qiu 6dbcfbd691 Addressed comments
Commit migrated from https://github.com/dotnet/corefx/commit/4b60d91a61848643c4449b386b113314cbac0d01
2016-05-18 14:00:02 -07:00
Amy Qiu 17d00d0993 Fix up refactored code
Commit migrated from https://github.com/dotnet/corefx/commit/cf16d0d9ad80e1aa3663afb9aedb2f1c66628355
2016-05-18 13:59:15 -07:00
Amy Qiu 9a920c737f Refactor MethodInfo Tests
Commit migrated from https://github.com/dotnet/corefx/commit/45dced9d40a40246e27d5c2f0269a5c9e5f91857
2016-05-18 13:52:45 -07:00
Jon Hanna 9e5785eb93 Fix Multiple Typos
Commit migrated from https://github.com/dotnet/corefx/commit/b0dd6b14fc845058b768fc7052b46aab0c1da22c
2016-03-20 16:37:09 +00:00
Pallavi Taneja 023592d559 Expose MethodInfo methods in System.Reflection
Commit migrated from https://github.com/dotnet/corefx/commit/7c9209ca662271f32f8ead65abf24eea0348e065
2016-02-29 17:13:31 -08:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
dotnet-bot 611db35e60 Initial commit System.Reflection.
Commit migrated from https://github.com/dotnet/corefx/commit/99433949e0cc77d69413d3cdb706d30ddb62267d
2015-05-18 11:14:29 -07:00