package kundedb.service;
import static org.junit.Assert.*;
public class KundedbCryptServiceTest {
@org.junit.Test
public void testGetEncrypted() {
String result = KundedbCryptService.crypt("PassW0rd", "aB");
assertEquals("Uventet resultat", "aB5i1RHN91xhc", result);
result = KundedbCryptService.crypt("PassW0rd");
assertTrue("Ugyldig resultat", result.matches("^[a-zA-Z0-9./]{13}$"));
result = KundedbCryptService.getSalt();
assertTrue("Ugyldig salt", result.matches("^[a-zA-Z0-9./]{2}$"));
}
}