added compatibility test

This commit is contained in:
Sebastian Sdorra
2012-02-14 21:52:29 +01:00
parent f0dae088e4
commit c1cf8dd0f3

View File

@@ -31,6 +31,12 @@
package sonia.scm.security; package sonia.scm.security;
//~--- non-JDK imports --------------------------------------------------------
import org.junit.Test;
import static org.junit.Assert.*;
/** /**
* *
* @author Sebastian Sdorra * @author Sebastian Sdorra
@@ -49,4 +55,18 @@ public class SHA1HashBuilderTest extends HashBuilderTestBase
{ {
return new SHA1HashBuilder(); return new SHA1HashBuilder();
} }
/**
* Method description
*
*/
@Test
public void testCompatibility()
{
MessageDigestEncryptionHandler mdeh = new MessageDigestEncryptionHandler();
String hash = mdeh.encrypt("trillian123");
String newHash = createHashBuilder().setValue("trillian123").toHexString();
assertEquals(hash, newHash);
}
} }