@@ -0,0 +1,1046 @@
+package edu.wustl.cab2b.client.ui.mainframe;%0D%0A%0D%0Aimport java.io.File;%0D%0Aimport java.io.FileInputStream;%0D%0Aimport java.io.FileNotFoundException;%0D%0Aimport java.io.IOException;%0D%0Aimport java.util.Properties;%0D%0A%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Apublic class UserValidatorTest extends TestCase %7B%0D%0A%09public void testValidateUser() %7B%0D%0A%0D%0A%09%09StringBuffer userHome = new StringBuffer(System%0D%0A%09%09%09%09.getProperty(%22user.home%22));%0D%0A%09%09userHome.append(File.separatorChar).append(%22user.properties%22);%0D%0A%09%09File file = new File(userHome.toString());%0D%0A%09%09Properties p = new Properties();%0D%0A%09%09try %7B%0D%0A%09%09%09p.load(new FileInputStream(file));%0D%0A%09%09%7D catch (FileNotFoundException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D catch (IOException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D%0D%0A%09%09String idP = %22Training%22;%0D%0A%09%09UserValidator userValiodator = new UserValidator(p%0D%0A%09%09%09%09.getProperty(%22username%22), idP);%0D%0A%09%09userValiodator.validateUser(p.getProperty(%22password%22));%0D%0A%09%09assertNotNull(%22serializedDCR in UserValidator might be null due to unappropriate certificates%22,userValiodator.serializedDCR);%0D%0A%0D%0A%09%7D%0D%0A%7D%0D%0A

Test Case for UseValidator