Skip to content

Commit 88e1bc9

Browse files
committed
fixed #3
Removed Fail from Item description and test description
1 parent ca8bfe9 commit 88e1bc9

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

ConventionTests/Conventions/Internal/ConventionData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ConventionData(params Type[] sourceTypes)
4040
/// <summary>
4141
/// 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).
4242
/// </summary>
43-
public string FailDescription { get; set; }
43+
public string Description { get; set; }
4444

4545
/// <summary>
4646
/// Specifies that there are valid exceptions to the rule specified by the convention.
@@ -60,7 +60,7 @@ public ConventionData(params Type[] sourceTypes)
6060
/// </summary>
6161
public Predicate<Type> Types { get; set; }
6262

63-
public Func<Type, string> FailItemDescription { get; set; }
63+
public Func<Type, string> ItemDescription { get; set; }
6464

6565
/// <summary>
6666
/// helper method to set <see cref="Assemblies" /> in a more convenient manner.

ConventionTests/Conventions/Internal/ConventionTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public override void Execute(IAssert assert)
2121
assert.Inconclusive(
2222
"No types found to apply the convention to. Make sure the Types predicate is correct and that the right assemblies to scan are specified.");
2323
}
24-
var itemDescription = (data.FailItemDescription ?? (t => t.ToString()));
24+
var itemDescription = (data.ItemDescription ?? (t => t.ToString()));
2525
var invalidTypes = Array.FindAll(typesToTest, t => data.Must(t) == false);
26-
var message = (data.FailDescription ?? "Invalid types found") + Environment.NewLine + "\t" +
26+
var message = (data.Description ?? "Invalid types found") + Environment.NewLine + "\t" +
2727
string.Join(Environment.NewLine + "\t", invalidTypes.Select(itemDescription));
2828
if (data.HasApprovedExceptions)
2929
{

ConventionTests/Conventions/Internal/WindsorConventionData.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public IWindsorContainer Container
2727
get { return container; }
2828
}
2929

30-
public Func<IHandler, string> FailItemDescription { get; set; }
30+
public Func<IHandler, string> ItemDescription { get; set; }
3131

32-
public string FailDescription { get; set; }
32+
public string Description { get; set; }
3333

3434
public bool HasApprovedExceptions { get; set; }
3535
}
@@ -53,11 +53,11 @@ public IWindsorContainer Container
5353
get { return container; }
5454
}
5555

56-
public Func<TDiagnosticData, string> FailItemDescription { get; set; }
56+
public Func<TDiagnosticData, string> ItemDescription { get; set; }
5757

5858
public Func<TDiagnosticData, bool> Must { get; set; }
5959

60-
public string FailDescription { get; set; }
60+
public string Description { get; set; }
6161

6262
public bool HasApprovedExceptions { get; set; }
6363

ConventionTests/Conventions/Internal/WindsorConventionTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public override void Execute(IAssert assert)
2121
{
2222
var conventionData = SetUp();
2323
var diagnosticData = GetDataToTest(conventionData);
24-
var itemDescription = (conventionData.FailItemDescription ?? (h => h.ToString() + "*"));
24+
var itemDescription = (conventionData.ItemDescription ?? (h => h.ToString() + "*"));
2525
var invalidData = conventionData.Must == null
2626
? diagnosticData
2727
: Array.FindAll(diagnosticData, h => conventionData.Must(h) == false);
28-
var message = (conventionData.FailDescription ?? "Invalid elements found") + Environment.NewLine + "\t" +
28+
var message = (conventionData.Description ?? "Invalid elements found") + Environment.NewLine + "\t" +
2929
string.Join(Environment.NewLine + "\t", invalidData.Select(itemDescription));
3030
if (conventionData.HasApprovedExceptions)
3131
{
@@ -83,11 +83,11 @@ public override void Execute(IAssert assert)
8383
assert.Inconclusive(
8484
"No handlers found to apply the convention to. Make sure the handlesr predicate is correct and that the right components were registered in the container.");
8585
}
86-
var itemDescription = (data.FailItemDescription ?? (h => h.GetComponentName()));
86+
var itemDescription = (data.ItemDescription ?? (h => h.GetComponentName()));
8787
var invalidComponents = data.Must == null
8888
? handlersToTest
8989
: Array.FindAll(handlersToTest, h => data.Must(h) == false);
90-
var message = (data.FailDescription ?? "Invalid components found") + Environment.NewLine + "\t" +
90+
var message = (data.Description ?? "Invalid components found") + Environment.NewLine + "\t" +
9191
string.Join(Environment.NewLine + "\t", invalidComponents.Select(itemDescription));
9292
if (data.HasApprovedExceptions)
9393
{

0 commit comments

Comments
 (0)