@@ -18,14 +18,14 @@ public void WhenNullMethodInfoThenThrows()
18
18
[ Test ]
19
19
public void WhenNullTypeThenThrows ( )
20
20
{
21
- var methodInfo = ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
21
+ var methodInfo = ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
22
22
Assert . Throws < ArgumentNullException > ( ( ) => methodInfo . IsMethodOf ( null ) ) ;
23
23
}
24
24
25
25
[ Test ]
26
26
public void WhenDeclaringTypeMatchThenTrue ( )
27
27
{
28
- Assert . That ( ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < int > ) ) , Is . True ) ;
28
+ Assert . That ( ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < int > ) ) , Is . True ) ;
29
29
}
30
30
31
31
private class MyCollection : List < int >
@@ -36,33 +36,33 @@ private class MyCollection: List<int>
36
36
[ Test ]
37
37
public void WhenCustomTypeMatchThenTrue ( )
38
38
{
39
- Assert . That ( ReflectionHelper . GetMethodDefinition < MyCollection > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < int > ) ) , Is . True ) ;
39
+ Assert . That ( ReflectHelper . GetMethodDefinition < MyCollection > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < int > ) ) , Is . True ) ;
40
40
}
41
41
42
42
[ Test ]
43
43
public void WhenTypeIsGenericDefinitionAndMatchThenTrue ( )
44
44
{
45
- Assert . That ( ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < > ) ) , Is . True ) ;
45
+ Assert . That ( ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( List < > ) ) , Is . True ) ;
46
46
}
47
47
48
48
[ Test ]
49
49
public void WhenTypeIsGenericImplementedInterfaceAndMatchThenTrue ( )
50
50
{
51
- var containsMethodDefinition = ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
51
+ var containsMethodDefinition = ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
52
52
Assert . That ( containsMethodDefinition . IsMethodOf ( typeof ( ICollection < int > ) ) , Is . True ) ;
53
53
}
54
54
55
55
[ Test ]
56
56
public void WhenTypeIsGenericImplementedInterfaceAndMatchGenericInterfaceDefinitionThenTrue ( )
57
57
{
58
- var containsMethodDefinition = ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
58
+ var containsMethodDefinition = ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) ;
59
59
Assert . That ( containsMethodDefinition . IsMethodOf ( typeof ( ICollection < > ) ) , Is . True ) ;
60
60
}
61
61
62
62
[ Test ]
63
63
public void WhenNoMatchThenFalse ( )
64
64
{
65
- Assert . That ( ReflectionHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( IEnumerable < > ) ) , Is . False ) ;
65
+ Assert . That ( ReflectHelper . GetMethodDefinition < List < int > > ( t => t . Contains ( 5 ) ) . IsMethodOf ( typeof ( IEnumerable < > ) ) , Is . False ) ;
66
66
}
67
67
68
68
private abstract class MyAbstractClass < T >
@@ -78,14 +78,14 @@ private class MyClass : MyAbstractClass<int>
78
78
[ Test ]
79
79
public void WhenTypeIsGenericImplementedAbstractAndMatchThenTrue ( )
80
80
{
81
- var containsMethodDefinition = ReflectionHelper . GetMethodDefinition < MyClass > ( t => t . MyMethod ( ) ) ;
81
+ var containsMethodDefinition = ReflectHelper . GetMethodDefinition < MyClass > ( t => t . MyMethod ( ) ) ;
82
82
Assert . That ( containsMethodDefinition . IsMethodOf ( typeof ( MyAbstractClass < int > ) ) , Is . True ) ;
83
83
}
84
84
85
85
[ Test ]
86
86
public void WhenTypeIsGenericImplementedAbstractAndMatchGenericInterfaceDefinitionThenTrue ( )
87
87
{
88
- var containsMethodDefinition = ReflectionHelper . GetMethodDefinition < MyClass > ( t => t . MyMethod ( ) ) ;
88
+ var containsMethodDefinition = ReflectHelper . GetMethodDefinition < MyClass > ( t => t . MyMethod ( ) ) ;
89
89
Assert . That ( containsMethodDefinition . IsMethodOf ( typeof ( MyAbstractClass < > ) ) , Is . True ) ;
90
90
}
91
91
}
0 commit comments