View Javadoc
1   package de.dlr.shepard.context.references.dataobject.entities;
2   
3   import de.dlr.shepard.BaseTestCase;
4   import de.dlr.shepard.auth.users.entities.User;
5   import de.dlr.shepard.context.collection.entities.Collection;
6   import de.dlr.shepard.context.collection.entities.DataObject;
7   import de.dlr.shepard.context.semantic.entities.SemanticAnnotation;
8   import de.dlr.shepard.context.version.entities.Version;
9   import nl.jqno.equalsverifier.EqualsVerifier;
10  import org.junit.jupiter.api.Test;
11  
12  public class CollectionReferenceTest extends BaseTestCase {
13  
14    @Test
15    public void equalsContract() {
16      EqualsVerifier.simple()
17        .forClass(CollectionReference.class)
18        .withPrefabValues(DataObject.class, new DataObject(1L), new DataObject(2L))
19        .withPrefabValues(Version.class, new Version("Version1"), new Version("Version2"))
20        .withPrefabValues(User.class, new User("bob"), new User("claus"))
21        .withPrefabValues(Collection.class, new Collection(1L), new Collection(2L))
22        .withPrefabValues(SemanticAnnotation.class, new SemanticAnnotation(1L), new SemanticAnnotation(2L))
23        .verify();
24    }
25  }