@@ -0,0 +1,977 @@
+package edu.iu.grid.oim.test;%0D%0A%0D%0Aimport static org.junit.Assert.*;%0D%0A/**%0D%0A * MT%0D%0A * Unit Test Cases for CNValidator%0D%0A */%0D%0A%0D%0Aimport org.junit.Test;%0D%0Aimport edu.iu.grid.oim.view.divrep.form.validator.CNValidator;%0D%0A%0D%0Apublic class CNValidatorTest %7B%0D%0A%0D%0A%09@Test%0D%0A%09public final void testIsValidCertificate() %7B%0D%0A%09%09CNValidator cnv = new CNValidator();%0D%0A%09%09%0D%0A%09%09// List of valid certificates%0D%0A%09%09String%5B%5D validCertNames = %7B%22iu.edu%22, %22*.edu%22, %22www.something.com%22%7D;%0D%0A%09%09%0D%0A%09%09for (String validCertName : validCertNames) %09%7B%0D%0A%09%09%09%0D%0A%09%09%09assertTrue(%22Certificate %3E%22 + validCertName + %22%3C is valid%22, cnv.isValid(validCertName));%09%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test%0D%0A%09public final void testIsInvalidCertificate() %7B%0D%0A%09%09CNValidator cnv = new CNValidator();%0D%0A%09%09%0D%0A%09%09// List of invalid certificates%0D%0A%09%09String%5B%5D invalidCertNames = %7B%22.iu.edu%22, %22/edu%22%7D;%0D%0A%09%09%0D%0A%09%09for (String invalidCertName : invalidCertNames) %09%7B%0D%0A%09%09%09%0D%0A%09%09%09assertFalse(%22Certificate %3E%22 + invalidCertName + %22%3C is invalid%22, cnv.isValid(invalidCertName));%09%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%7D%0D%0A

Test case for Jira OIM-82