Class DefaultAuthenticationServiceTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTransactionalBaseTest
-
- de.hybris.platform.servicelayer.security.auth.impl.DefaultAuthenticationServiceTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class DefaultAuthenticationServiceTest extends ServicelayerTransactionalBaseTest
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.ExpectedExceptionthrown-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidshouldLoginWhenUserIsDeactivatedInFuture()voidshouldThrowInvalidCredentialsExceptionWhenLoginIsDisabled()voidshouldThrowInvalidCredentialsExceptionWhenPasswordEncodingIsWrongOrNotKnown()voidshouldThrowInvalidCredentialsExceptionWhenUserIsAnonymousAndAnonymousLoginIsDisabled()voidshouldThrowInvalidCredentialsExceptionWhenUserIsDeactivated()voidtearDown()voidtestChangePassword()voidtestCheckCredentials()voidtestCheckCredentialsWrongPwd()voidtestCheckCredentialsWrongUser()voidtestEncodedPasswords()voidtestFalseEncoding()small test for getting the encoder not found exceptionvoidtestLoginLogout()voidtestLoginWithEmptyPassword()voidtestLoginWithEmptyPasswordWithAcceptEmptyFlagSetToTrue()voidtestLoginWrongPwd()voidtestLoginWrongUser()-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
setUp
public void setUp()
-
tearDown
public void tearDown()
-
testLoginLogout
public void testLoginLogout() throws InvalidCredentialsException, JaloSecurityException
-
testLoginWithEmptyPassword
public void testLoginWithEmptyPassword() throws InvalidCredentialsException, EJBPasswordEncoderNotFoundException
-
testLoginWithEmptyPasswordWithAcceptEmptyFlagSetToTrue
public void testLoginWithEmptyPasswordWithAcceptEmptyFlagSetToTrue() throws InvalidCredentialsException, EJBPasswordEncoderNotFoundException
-
testLoginWrongPwd
public void testLoginWrongPwd() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
testLoginWrongUser
public void testLoginWrongUser() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
shouldThrowInvalidCredentialsExceptionWhenLoginIsDisabled
public void shouldThrowInvalidCredentialsExceptionWhenLoginIsDisabled()
-
shouldThrowInvalidCredentialsExceptionWhenUserIsDeactivated
public void shouldThrowInvalidCredentialsExceptionWhenUserIsDeactivated()
-
shouldLoginWhenUserIsDeactivatedInFuture
public void shouldLoginWhenUserIsDeactivatedInFuture() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
shouldThrowInvalidCredentialsExceptionWhenPasswordEncodingIsWrongOrNotKnown
public void shouldThrowInvalidCredentialsExceptionWhenPasswordEncodingIsWrongOrNotKnown()
-
testCheckCredentials
public void testCheckCredentials() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
testCheckCredentialsWrongPwd
public void testCheckCredentialsWrongPwd() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
testCheckCredentialsWrongUser
public void testCheckCredentialsWrongUser() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
testEncodedPasswords
public void testEncodedPasswords() throws ConsistencyCheckException- Throws:
ConsistencyCheckException
-
testFalseEncoding
public void testFalseEncoding()
small test for getting the encoder not found exception
-
testChangePassword
public void testChangePassword() throws java.lang.Exception- Throws:
java.lang.Exception
-
shouldThrowInvalidCredentialsExceptionWhenUserIsAnonymousAndAnonymousLoginIsDisabled
public void shouldThrowInvalidCredentialsExceptionWhenUserIsAnonymousAndAnonymousLoginIsDisabled() throws InvalidCredentialsException- Throws:
InvalidCredentialsException
-
-