@Test public void testUserInfo(){ UserInfo userinfo=new UserInfo(); userinfo.setEnableAuthentication(true); userinfo.setEnableAuthorization(true); userinfo.setEnabled(true); AuthenticationImpl model=new AuthenticationImpl(); model.authenticationEnabled(); model.checkSession("test"); AuthModels.authentication(); Map<String, Object> ext=new HashMap<String, Object>(); ext.put("test","test"); userinfo.setExt(ext); userinfo.setLoginSuccess(true); userinfo.setToken("test"); userinfo.setUserName("test"); assertTrue(userinfo.getExt().equals(ext)); assertTrue(userinfo.getToken().equals("test")); assertTrue(userinfo.getUserName().equals("test")); assertTrue(userinfo.isEnableAuthentication()); assertTrue(userinfo.isEnableAuthorization()); assertTrue(userinfo.isLoginSuccess()); assertTrue(userinfo.isEnabled()); }
public static Authentication authentication(){ return AuthenticationHolder.auth; }
AuthModels { public static Authentication authentication(){ return AuthenticationHolder.auth; } }
AuthModels { public static Authentication authentication(){ return AuthenticationHolder.auth; }  }
AuthModels { public static Authentication authentication(){ return AuthenticationHolder.auth; }  static Authentication authentication(); static Authorization authorization(); }
AuthModels { public static Authentication authentication(){ return AuthenticationHolder.auth; }  static Authentication authentication(); static Authorization authorization(); static final String AUTHENTICATION_ENABLE_KEY; static final String AUTHORIZATION_ENABLE_KEY; static final String AUTHENTICATION_IMPLEMENTATION_KEY; static final String AUTHORIZATION_IMPLEMENTATION_KEY; }