diff --git a/src/main/java/CredentialRepository.java b/src/main/java/CredentialRepository.java index acc0c08..4dd28dd 100644 --- a/src/main/java/CredentialRepository.java +++ b/src/main/java/CredentialRepository.java @@ -2,7 +2,7 @@ import java.util.ArrayList; public class CredentialRepository implements CredentialRepositoryInterface{ - private int idCounter = 1; + private int idCounter = 0; private ArrayList credentials; public CredentialRepository() diff --git a/src/test/java/CredentialRepositoryTest.java b/src/test/java/CredentialRepositoryTest.java index bb10bc6..9159b87 100644 --- a/src/test/java/CredentialRepositoryTest.java +++ b/src/test/java/CredentialRepositoryTest.java @@ -36,7 +36,7 @@ class CredentialRepositoryTest { this.credentialRepository.createNewCredential("mock", "mock"); this.credentialRepository.createNewCredential("kek", "mate"); - Credential c = this.credentialRepository.getCredentialsViaId(2); + Credential c = this.credentialRepository.getCredentialsViaId(1); Assertions.assertEquals("mate", c.getPassword()); }