public void CreateThrowsExceptionWhenRuleDoesNotMatchCriteriaTest() { var target = new CreationRule(typeof(string), string.Empty, 10, (object)null); Action action = () => target.Create(typeof(Guid), string.Empty, null); action.ShouldThrow<NotSupportedException>(); }
public void CreateReturnsValueFromConstructorTest() { var type = typeof(string); var name = Guid.NewGuid().ToString(); var priority = Environment.TickCount; var expected = Guid.NewGuid().ToString(); var target = new CreationRule((checkType, referenceName) => true, priority, expected); var actual = target.Create(type, name, null); actual.Should().Be(expected); }