Esempio n. 1
0
        public void Validate_AppSupportDepartmentUnknownTitle_Throws()
        {
            var validator = new ValidateAppsTitle();
            var data = new[]
            {
                new FileData { Fieldname = Constants.Field.Dept, StringValue = Constants.Department.Apps },
                new FileData { Fieldname = Constants.Field.Title, StringValue = "abc" }
            };

            Assert.Throws<ArgumentException>(() => validator.Validate(data));
        }
Esempio n. 2
0
        public void Validate_AppSupportDepartmentKnownTitle_Succeeds(string title)
        {
            var validator = new ValidateAppsTitle();
            var data = new[]
            {
                new FileData { Fieldname = Constants.Field.Dept, StringValue = Constants.Department.Architecture },
                new FileData { Fieldname = Constants.Field.Title, StringValue = title }
            };

            Assert.DoesNotThrow(() => validator.Validate(data));
        }