diff --git a/core-domain/src/test/java/org/uniprot/core/cv/xdb/UniProtKBDatabaseDetailTest.java b/core-domain/src/test/java/org/uniprot/core/cv/xdb/UniProtKBDatabaseDetailTest.java index 2cc3652c4..017046123 100644 --- a/core-domain/src/test/java/org/uniprot/core/cv/xdb/UniProtKBDatabaseDetailTest.java +++ b/core-domain/src/test/java/org/uniprot/core/cv/xdb/UniProtKBDatabaseDetailTest.java @@ -51,7 +51,6 @@ void testCreateObject() { assertEquals("description", dbType.getAttributes().get(0).getXmlTag()); Assertions.assertNull(dbType.getAttributes().get(0).getUriLink()); assertEquals(this.idMappingName, dbType.getIdMappingName()); - assertEquals(this.type, dbType.getType()); } @Test @@ -105,6 +104,15 @@ void needDefaultConstructorForJsonDeserialization() { assertNull(obj.getType()); } + @Test + void testCreateObjectWithType(){ + UniProtDatabaseDetail dbDetails = new UniProtDatabaseDetail(this.name, this.displayName, + this.category, this.uriLink, this.attributes, false, + null, this.idMappingName, this.type); + assertNotNull(dbDetails); + assertEquals(this.type, dbDetails.getType()); + } + private UniProtDatabaseDetail createUniProtDatabaseDetail(boolean passAttribute) { if (passAttribute) { return createUniProtDatabaseDetail( @@ -113,7 +121,6 @@ private UniProtDatabaseDetail createUniProtDatabaseDetail(boolean passAttribute) this.category, this.uriLink, this.attributes, - null, null); } else { return createUniProtDatabaseDetail( @@ -122,8 +129,7 @@ private UniProtDatabaseDetail createUniProtDatabaseDetail(boolean passAttribute) this.category, this.uriLink, null, - this.idMappingName, - this.type); + this.idMappingName); } } @@ -133,9 +139,8 @@ static UniProtDatabaseDetail createUniProtDatabaseDetail( UniProtDatabaseCategory category, String uriLink, List attributes, - String idMappingName, - String type) { + String idMappingName) { return new UniProtDatabaseDetail( - name, displayName, category, uriLink, attributes, false, null, idMappingName, type); + name, displayName, category, uriLink, attributes, false, null, idMappingName); } }