@@ -19,9 +19,9 @@ public class Convetions
19
19
[ TestCaseSource ( nameof ( GetTypes ) ) ]
20
20
public void Events ( Type type )
21
21
{
22
- // Namespace should be EliteAPI.Events
23
- Assert . That ( type . Namespace ! . StartsWith ( "EliteAPI.Events" ) ,
24
- $ "Type { type . Name } should be in namespace EliteAPI.Events") ;
22
+ // // Namespace should be EliteAPI.Events
23
+ // Assert.That(type.Namespace!.StartsWith("EliteAPI.Events"),
24
+ // $"Type {type.Name} should be in namespace EliteAPI.Events");
25
25
26
26
// Name should not have underscores
27
27
Assert . That ( ! type . Name . Contains ( "_" ) ,
@@ -40,17 +40,6 @@ public void Events(Type type)
40
40
$ "Type { type . Name } should implement IEvent") ;
41
41
}
42
42
43
- [ Test ( Description = "Property namespace" ) ]
44
- [ TestCaseSource ( nameof ( GetProperties ) ) ]
45
- public void PropertyNamespace ( PropertyInfo property )
46
- {
47
- var name = property . DeclaringType ! . Name + "." + property . Name ;
48
-
49
- // Namespace should be EliteAPI.Events
50
- Assert . That ( property . DeclaringType ! . Namespace ! . StartsWith ( "EliteAPI.Events" ) ,
51
- $ "Property { name } should be in namespace EliteAPI.Events") ;
52
- }
53
-
54
43
[ Test ( Description = "Property underscores" ) ]
55
44
[ TestCaseSource ( nameof ( GetProperties ) ) ]
56
45
public void PropertyUnderscores ( PropertyInfo property )
@@ -100,7 +89,7 @@ public void PropertyType(PropertyInfo property)
100
89
}
101
90
102
91
if ( property . PropertyType == typeof ( bool ) &&
103
- ! property . DeclaringType . Namespace . StartsWith ( "EliteAPI.Events. Status") )
92
+ ! property . DeclaringType . Namespace . Contains ( " Status") )
104
93
{
105
94
// Property should be named IsX or HasX or WasX
106
95
var prefixes = new [ ] { "Is" , "Has" , "Was" , "Allows" , "Can" , "Should" } ;
0 commit comments