X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FAbstractSoneBuilderTest.java;h=9b64b6a2c4e7f88eaee6e17c9c365365d195abd2;hb=fd9d1edd9eef0dff1e9dd17a6bc55cb9e4da8f9f;hp=b2d86dde207aee8397dd583244de618386f274ff;hpb=210684b4bc499e298a0d0abeddd4008cdeb406bc;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilderTest.java b/src/test/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilderTest.java index b2d86dd..9b64b6a 100644 --- a/src/test/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilderTest.java +++ b/src/test/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilderTest.java @@ -26,29 +26,41 @@ public class AbstractSoneBuilderTest { @Test public void localSoneIsValidated() { Identity ownIdentity = mock(OwnIdentity.class); - soneBuilder.local().from(ownIdentity).build(); + soneBuilder.local().from(ownIdentity).lastUpdated(1).build(); } @Test(expected = IllegalStateException.class) public void localSoneIsNotValidatedIfIdentityIsNotAnOwnIdentity() { Identity identity = mock(Identity.class); - soneBuilder.local().from(identity).build(); + soneBuilder.local().from(identity).lastUpdated(1).build(); } @Test(expected = IllegalStateException.class) public void localSoneIsNotValidatedIfIdentityIsNull() { - soneBuilder.local().build(); + soneBuilder.local().lastUpdated(1).build(); } @Test - public void removeSoneIsValidate() { + public void remoteSoneIsValidated() { Identity identity = mock(Identity.class); - soneBuilder.from(identity).build(); + soneBuilder.from(identity).lastUpdated(1).build(); } @Test(expected = IllegalStateException.class) public void remoteSoneIsNotValidatedIfIdentityIsNull() { - soneBuilder.build(); + soneBuilder.lastUpdated(1).build(); + } + + @Test(expected = IllegalStateException.class) + public void localSoneIsNotValidatedWithoutUpdateTime() { + Identity identity = mock(OwnIdentity.class); + soneBuilder.from(identity).local().build(); + } + + @Test(expected = IllegalStateException.class) + public void remoteSoneIsNotValidatedWithoutUpdateTime() { + Identity identity = mock(Identity.class); + soneBuilder.from(identity).build(); } }