private TestDocumentModel CreateModel(Guid id)
        {
            var model = new TestDocumentModel
            {
                Id = id,
            };

            return(model);
        }
        private List <ValidationResult> Validate(TestDocumentModel model)
        {
            var vr = new List <ValidationResult>();
            var vc = new ValidationContext(model);

            Validator.TryValidateObject(model, vc, vr, true);

            return(vr);
        }
        public void CheckForMissingMandatoryFields()
        {
            // Arrange
            var model = new TestDocumentModel();

            // Act
            var vr = Validate(model);

            // Assert
            Assert.True(vr.Count == 1);
            Assert.Contains(vr, c => c.MemberNames.Any(a => a == nameof(model.Id)));
        }