Skip to content

Commit

Permalink
Restored DummyExecuteOrderRule.
Browse files Browse the repository at this point in the history
  • Loading branch information
roryprimrose committed Jan 24, 2020
1 parent 4f5d114 commit 0927c4f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ModelBuilder.UnitTests/BuildConfigurationExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ public void AddWithCreationRuleThrowsExceptionWithNullRuleTest()
[Fact]
public void AddWithExecuteOrderRuleAddsRuleToCompilerTest()
{
var rule = new ExecuteOrderRule(typeof(Person), typeof(string), "FirstName", Environment.TickCount);
var rule = new PredicateExecuteOrderRule(x => x.Name == "FirstName", Environment.TickCount);

var target = new BuildConfiguration();

Expand All @@ -526,7 +526,7 @@ public void AddWithExecuteOrderRuleAddsRuleToCompilerTest()
[Fact]
public void AddWithExecuteOrderRuleThrowsExceptionWithNullCompilerTest()
{
var rule = new ExecuteOrderRule(typeof(Person), typeof(string), "FirstName", Environment.TickCount);
var rule = new PredicateExecuteOrderRule(x => x.Name == "FirstName", Environment.TickCount);

Action action = () => BuildConfigurationExtensions.Add(null, rule);

Expand All @@ -538,7 +538,7 @@ public void AddWithExecuteOrderRuleThrowsExceptionWithNullRuleTest()
{
var target = Substitute.For<IBuildConfiguration>();

Action action = () => target.Add((ExecuteOrderRule) null);
Action action = () => target.Add((PredicateExecuteOrderRule) null);

action.Should().Throw<ArgumentNullException>();
}
Expand Down
15 changes: 15 additions & 0 deletions ModelBuilder.UnitTests/DummyExecuteOrderRule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace ModelBuilder.UnitTests
{
using System.Reflection;
using ModelBuilder.ExecuteOrderRules;

public class DummyExecuteOrderRule : IExecuteOrderRule
{
public bool IsMatch(PropertyInfo property)
{
return false;
}

public int Priority { get; } = 100;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using FluentAssertions;
using ModelBuilder.IgnoreRules;
using ModelBuilder.IgnoreRules;
using ModelBuilder.UnitTests.Models;
using Xunit;

Expand Down

0 comments on commit 0927c4f

Please sign in to comment.