|
|
@ -30,6 +30,24 @@ class CredentialRepositoryTest { |
|
|
|
Assertions.assertEquals("mate", c.getPassword()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void searchForIdInRepository() { |
|
|
|
|
|
|
|
this.credentialRepository.createNewCredential("mock", "mock"); |
|
|
|
this.credentialRepository.createNewCredential("kek", "mate"); |
|
|
|
|
|
|
|
Credential c = this.credentialRepository.getCredentialsViaId(2); |
|
|
|
Assertions.assertEquals("mate", c.getPassword()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testSearchWithInvalidIndex() { |
|
|
|
|
|
|
|
this.credentialRepository.createNewCredential("mock", "mock"); |
|
|
|
|
|
|
|
Assertions.assertEquals(null, this.credentialRepository.getCredentialsViaId(2)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|