@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 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();
}
}