public void NullCollectionLinqToEntities_Exception()
            {
                var sut       = new MinLengthSpecification <int[]>(0, true);
                var exception = Record.Exception(() => sut.IsNotSatisfiedBy(null));

                Assert.NotNull(exception);
                Assert.IsType <ArgumentNullException>(exception);
            }
            public void InvalidCandidate_ReturnFalse <T>(T candidate, int minLength)
                where T : IEnumerable
            {
                var sut = new MinLengthSpecification <T>(minLength);

                var result = sut.IsNotSatisfiedBy(candidate);

                Assert.False(result);
            }
            public void ValidCandidate_ReturnTrue <T>(T candidate, int minLength)
                where T : IEnumerable
            {
                candidate = candidate?.ToString() != "null" ? candidate : default;
                var sut = new MinLengthSpecification <T>(minLength);

                var result = sut.IsNotSatisfiedBy(candidate);

                Assert.True(result);
            }
            public void InvalidCandidate_ReturnExpectedResultObject <T>(T candidate, int minLength,
                                                                        SpecificationResult expected)
                where T : IEnumerable
            {
                var sut = new MinLengthSpecification <T>(minLength);

                var overall = sut.IsNotSatisfiedBy(candidate, out var result);

                Assert.False(overall);
                Assert.Equal(expected, result, new SpecificationResultComparer());
            }
            public void ValidCandidate_ReturnExpectedResultObject <T>(T candidate, int minLength,
                                                                      SpecificationResult expected)
                where T : IEnumerable
            {
                candidate = candidate?.ToString() != "null" ? candidate : default;
                var sut = new MinLengthSpecification <T>(minLength);

                var overall = sut.IsNotSatisfiedBy(candidate, out var result);

                Assert.True(overall);
                Assert.Equal(expected, result, new SpecificationResultComparer());
            }