public void GivenEntityListWithNoElements_AndValidationContext_WhenValidate_ThenThrowException()
        {
            List<TestEntity> toValidate = new List<TestEntity>();
            ValidationContext validationContext = new ValidationContext(toValidate) { DisplayName = "Test Entity Value", MemberName = "Value" };
            var target = new RequiredElementsAttribute();

            target.ExpectException<ValidationException>(() => target.Validate(toValidate, validationContext));
        }
        public void GivenEntityListWithNoElements_AndValidationContext_WhenValidate_ThenThrowException()
        {
            List <TestEntity> toValidate        = new List <TestEntity>();
            ValidationContext validationContext = new ValidationContext(toValidate)
            {
                DisplayName = "Test Entity Value", MemberName = "Value"
            };
            var target = new RequiredElementsAttribute();

            target.ExpectException <ValidationException>(() => target.Validate(toValidate, validationContext));
        }