Removed locale-specific message value assertions which will cause tests to fail if run with a different standard locale for which we have a message file (e.g. Chinese).

This commit is contained in:
Luke Taylor 2007-10-11 15:23:01 +00:00
parent 92bc57eefd
commit 0a214e4930
3 changed files with 0 additions and 29 deletions

View File

@ -35,7 +35,6 @@ public class AnonymousAuthenticationProviderTests extends TestCase {
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================
public AnonymousAuthenticationProviderTests() { public AnonymousAuthenticationProviderTests() {
super();
} }
public AnonymousAuthenticationProviderTests(String arg0) { public AnonymousAuthenticationProviderTests(String arg0) {
@ -44,14 +43,6 @@ public class AnonymousAuthenticationProviderTests extends TestCase {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
public static void main(String[] args) {
junit.textui.TestRunner.run(AnonymousAuthenticationProviderTests.class);
}
public final void setUp() throws Exception {
super.setUp();
}
public void testDetectsAnInvalidKey() throws Exception { public void testDetectsAnInvalidKey() throws Exception {
AnonymousAuthenticationProvider aap = new AnonymousAuthenticationProvider(); AnonymousAuthenticationProvider aap = new AnonymousAuthenticationProvider();
aap.setKey("qwerty"); aap.setKey("qwerty");
@ -63,8 +54,6 @@ public class AnonymousAuthenticationProviderTests extends TestCase {
Authentication result = aap.authenticate(token); Authentication result = aap.authenticate(token);
fail("Should have thrown BadCredentialsException"); fail("Should have thrown BadCredentialsException");
} catch (BadCredentialsException expected) { } catch (BadCredentialsException expected) {
assertEquals("The presented AnonymousAuthenticationToken does not contain the expected key",
expected.getMessage());
} }
} }

View File

@ -48,7 +48,6 @@ public class CasAuthenticationProviderTests extends TestCase {
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================
public CasAuthenticationProviderTests() { public CasAuthenticationProviderTests() {
super();
} }
public CasAuthenticationProviderTests(String arg0) { public CasAuthenticationProviderTests(String arg0) {
@ -57,10 +56,6 @@ public class CasAuthenticationProviderTests extends TestCase {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
public static void main(String[] args) {
junit.textui.TestRunner.run(CasAuthenticationProviderTests.class);
}
private UserDetails makeUserDetails() { private UserDetails makeUserDetails() {
return new User("user", "password", true, true, true, true, return new User("user", "password", true, true, true, true,
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ONE"), new GrantedAuthorityImpl("ROLE_TWO")}); new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ONE"), new GrantedAuthorityImpl("ROLE_TWO")});
@ -170,7 +165,6 @@ public class CasAuthenticationProviderTests extends TestCase {
Authentication result = cap.authenticate(token); Authentication result = cap.authenticate(token);
fail("Should have thrown BadCredentialsException"); fail("Should have thrown BadCredentialsException");
} catch (BadCredentialsException expected) { } catch (BadCredentialsException expected) {
assertEquals("Failed to provide a CAS service ticket to validate", expected.getMessage());
} }
} }
@ -192,7 +186,6 @@ public class CasAuthenticationProviderTests extends TestCase {
Authentication result = cap.authenticate(token); Authentication result = cap.authenticate(token);
fail("Should have thrown BadCredentialsException"); fail("Should have thrown BadCredentialsException");
} catch (BadCredentialsException expected) { } catch (BadCredentialsException expected) {
assertEquals("The presented CasAuthenticationToken does not contain the expected key", expected.getMessage());
} }
} }

View File

@ -35,7 +35,6 @@ public class RememberMeAuthenticationProviderTests extends TestCase {
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================
public RememberMeAuthenticationProviderTests() { public RememberMeAuthenticationProviderTests() {
super();
} }
public RememberMeAuthenticationProviderTests(String arg0) { public RememberMeAuthenticationProviderTests(String arg0) {
@ -44,14 +43,6 @@ public class RememberMeAuthenticationProviderTests extends TestCase {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
public static void main(String[] args) {
junit.textui.TestRunner.run(RememberMeAuthenticationProviderTests.class);
}
public final void setUp() throws Exception {
super.setUp();
}
public void testDetectsAnInvalidKey() throws Exception { public void testDetectsAnInvalidKey() throws Exception {
RememberMeAuthenticationProvider aap = new RememberMeAuthenticationProvider(); RememberMeAuthenticationProvider aap = new RememberMeAuthenticationProvider();
aap.setKey("qwerty"); aap.setKey("qwerty");
@ -63,8 +54,6 @@ public class RememberMeAuthenticationProviderTests extends TestCase {
Authentication result = aap.authenticate(token); Authentication result = aap.authenticate(token);
fail("Should have thrown BadCredentialsException"); fail("Should have thrown BadCredentialsException");
} catch (BadCredentialsException expected) { } catch (BadCredentialsException expected) {
assertEquals("The presented RememberMeAuthenticationToken does not contain the expected key",
expected.getMessage());
} }
} }