/* vim: set ts=2 et sw=2 cindent fo=qroca: */ package com.globant.katari.sample.integration; import junit.framework.TestCase; // import org.jasig.cas.authentication.principal.UsernamePasswordCredentials; // import com.globant.katari.sample.testsupport.SpringTestUtils; import // com.globant.katari.sample.user.domain.UserRepository; /* This class represents a TestCase of the user. In this class we will test all * the features of the user. */ public class CasDomainAuthenticationHandlerTest extends TestCase { // Dummy test, can be removed. public final void testTrue() { } ///* This is the implementation of the repository of the user. //*/ //private UserRepository repository; //private CasDomainAuthenticationHandler casDomainAuthHandler; ///* This is a set up method of this TestCase. //*/ //protected final void setUp() { // repository = (UserRepository) SpringTestUtils.getBeanFactory().getBean( // "user.userRepository"); // casDomainAuthHandler = new CasDomainAuthenticationHandler(repository); //} ///* Test the Authenticate method. Generates a credential and tries to validate // * it. // */ //public final void testAuthenticate() { // UsernamePasswordCredentials credential = new UsernamePasswordCredentials(); // credential.setUsername("admin"); // credential.setPassword("admin"); // assertTrue(casDomainAuthHandler.authenticate(credential)); //} ///* Test the Supports method. It verifies if the passed Credential is of // * UsernamePasswordCredentials class. // */ //public final void testSupports() { // UsernamePasswordCredentials credential = new UsernamePasswordCredentials(); // credential.setUsername("admin"); // credential.setPassword("admin"); // assertTrue(casDomainAuthHandler.supports(credential)); //} }