public void DoesNotAddsExpectedBrokenRuleWhenNotNull()
        {
            var entity = new EntityStub { TestStringProperty = "test" };

            var sut = new List<BrokenRule>();
            sut.AddIfPropertyIsNull(entity.TestStringProperty, () => entity.TestStringProperty);

            Assert.False(sut.Any());
        }
        public void AddsExpectedBrokenRuleWhenNull()
        {
            var entity = new EntityStub{TestStringProperty = null};
            var propertyName = PropertyNameHelper.GetName(() => entity.TestStringProperty);
            var expected = new List<BrokenRule>{
                new NotNull(propertyName)
            };

            var sut = new List<BrokenRule>();
            sut.AddIfPropertyIsNull(entity.TestStringProperty, () => entity.TestStringProperty);

            CustomAssertions.BrokenRuleAssertions.ListsEqual(expected, sut);
        }