aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/ReflectionHelper.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-28 23:35:00 +0800
committer杨宇千 <crupest@outlook.com>2019-10-28 23:35:00 +0800
commit006d799d2fe5f081c188f95a8590c4b75a93caae (patch)
tree97ed1fa767e1492cd3df292247d8fd3e47252882 /Timeline.Tests/Helpers/ReflectionHelper.cs
parentc11a1b7be5d41bb1825a7190c708fdb04923a4fd (diff)
downloadtimeline-006d799d2fe5f081c188f95a8590c4b75a93caae.tar.gz
timeline-006d799d2fe5f081c188f95a8590c4b75a93caae.tar.bz2
timeline-006d799d2fe5f081c188f95a8590c4b75a93caae.zip
Add UserDetailController unit tests.
Diffstat (limited to 'Timeline.Tests/Helpers/ReflectionHelper.cs')
-rw-r--r--Timeline.Tests/Helpers/ReflectionHelper.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Timeline.Tests/Helpers/ReflectionHelper.cs b/Timeline.Tests/Helpers/ReflectionHelper.cs
new file mode 100644
index 00000000..3f6036e3
--- /dev/null
+++ b/Timeline.Tests/Helpers/ReflectionHelper.cs
@@ -0,0 +1,13 @@
+using System.Linq;
+using System.Reflection;
+
+namespace Timeline.Tests.Helpers
+{
+ public static class ReflectionHelper
+ {
+ public static ParameterInfo GetParameter(this MethodInfo methodInfo, string name)
+ {
+ return methodInfo.GetParameters().Where(p => p.Name == name).Single();
+ }
+ }
+}