You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// This is where we set what our convention is all about
21
+
/// </summary>
22
+
publicclassConventionData
23
+
{
24
+
/// <summary>
25
+
/// list of assemblies to scan for types that our convention is related to. Can be null, in which case all assemblies starting with 'Als.' will be scanned
26
+
/// </summary>
27
+
publicAssembly[]Assemblies{get;set;}
28
+
29
+
/// <summary>
30
+
/// Descriptive text used for failure message in test. Should explan what is wrong, and how to fix it (how to make types that do not conform to the convention do so).
31
+
/// </summary>
32
+
publicstringFailDescription{get;set;}
33
+
34
+
/// <summary>
35
+
/// Specifies that there are valid exceptions to the rule specified by the convention.
36
+
/// </summary>
37
+
/// <remarks>
38
+
/// When set to <c>true</c> will run the test as Approval test so that the exceptional cases can be reviewed and approved.
39
+
/// </remarks>
40
+
publicboolHasApprovedExceptions{get;set;}
41
+
42
+
/// <summary>
43
+
/// This is the convention. The predicate should return <c>true</c> for types that do conform to the convention, and <c>false</c> otherwise
44
+
/// </summary>
45
+
publicPredicate<Type>Must{get;set;}
46
+
47
+
/// <summary>
48
+
/// Predicate that finds types that we want to apply out convention to.
/// Base class for convention tests. Inherited types should be put in "/Conventions" folder in test assembly and follow Sentence_naming_convention_with_underscores_indead_of_spaces These tests will be ran by <see
78
+
/// cref="ConventionTestsRunner" /> .
79
+
/// </summary>
80
+
publicabstractclassConventionTest:IConventionTest
81
+
{
82
+
#region IConventionTest Members
83
+
84
+
publicvirtualstringName
85
+
{
86
+
get{returnGetType().Name.Replace('_',' ');}
87
+
}
88
+
89
+
publicvirtualvoidExecute()
90
+
{
91
+
vardata=SetUp();
92
+
vartypesToTest=GetTypesToTest(data);
93
+
if(typesToTest.Length==0)
94
+
{
95
+
Assert.Inconclusive(
96
+
"No types found to apply the convention to. Make sure the Types predicate is correct and that the right assemblies to scan are specified.");
0 commit comments