public void DoesNotAddsExpectedBrokenRuleWhenNotNull()
        {
            var entity = new EntityStub { TestIntProperty = 1 };

            var sut = new List<BrokenRule>();
            sut.AddIfIntegerPropertyLessThanOne(
                entity.TestIntProperty, () => entity.TestIntProperty);

            Assert.False(sut.Any());
        }
        public void AddsExpectedBrokenRuleWhenNull(int value)
        {
            var entity = new EntityStub { TestIntProperty = value };
            var propertyName = PropertyNameHelper.GetName(() => entity.TestIntProperty);
            var expected = new List<BrokenRule>{
                new IntegerNeedsToBeGreaterThanZero(propertyName)
            };

            var sut = new List<BrokenRule>();
            sut.AddIfIntegerPropertyLessThanOne(
                entity.TestIntProperty, () => entity.TestIntProperty);

               BrokenRuleAssertions.ListsEqual(expected, sut);
        }