Skip to content

Commit

Permalink
Renamed HaveOnlyNullableMembers to OnlyHaveNullableMembers
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorris committed Mar 22, 2019
1 parent e4df8bd commit 21e8412
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class WidgetController
{
protected readonly IWidgetService _service;

protected readonly string _field;

public WidgetController(IWidgetService service)
{
_service = service;
Expand All @@ -18,5 +20,7 @@ public async Task<string> ListSomeWidgetsAsync()
var widgets = await _service.GetWidgetsAsync();
return (string.Join(", ", widgets.Select(w => w.Name)));
}

public string AProperty { get; }
}
}
2 changes: 1 addition & 1 deletion src/NetArchTest.Rules/Conditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public ConditionList BeMutable()
/// Selects types according to whether they have nullable members.
/// </summary>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public ConditionList HaveOnlyNullableMembers()
public ConditionList OnlyHaveNullableMembers()
{
_sequence.AddFunctionCall(FunctionDelegates.HasNullableMembers, true, true);
return new ConditionList(_types, _should, _sequence);
Expand Down
4 changes: 2 additions & 2 deletions src/NetArchTest.Rules/NetArchTest.Rules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/NetArchTest.Rules/Predicates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public PredicateList AreMutable()
/// Selects types that have only nullable members.
/// </summary>
/// <returns>An updated set of predicates that can be applied to a list of types.</returns>
public PredicateList HaveOnlyNullableMembers()
public PredicateList OnlyHaveNullableMembers()
{
_sequence.AddFunctionCall(FunctionDelegates.HasNullableMembers, true, true);
return new PredicateList(_types, _sequence);
Expand Down
2 changes: 1 addition & 1 deletion test/NetArchTest.Rules.UnitTests/ConditionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public void AreNullable_MatchesFound_ClassSelected()
.And()
.DoNotHaveNameStartingWith("NonNullableClass")
.Should()
.HaveOnlyNullableMembers().GetResult();
.OnlyHaveNullableMembers().GetResult();

Assert.True(result.IsSuccessful);
}
Expand Down
2 changes: 1 addition & 1 deletion test/NetArchTest.Rules.UnitTests/PredicateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void AreNullable_MatchesFound_ClassSelected()
.And()
.AreClasses()
.And()
.HaveOnlyNullableMembers().GetTypes();
.OnlyHaveNullableMembers().GetTypes();

Assert.Single(result); // One result
Assert.Contains<Type>(typeof(NullableClass), result);
Expand Down

0 comments on commit 21e8412

Please sign in to comment.