-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'manifestation-backend-impl' into 'main'
- Loading branch information
Showing
52 changed files
with
1,180 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...rc/test/java/de/digitalcollections/cudami/client/relation/CudamiPredicatesClientTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package de.digitalcollections.cudami.client.relation; | ||
|
||
import de.digitalcollections.cudami.client.BaseCudamiRestClientTest; | ||
import de.digitalcollections.model.relation.Predicate; | ||
import java.util.UUID; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
@DisplayName("The PredicatesClient") | ||
class CudamiPredicatesClientTest | ||
extends BaseCudamiRestClientTest<Predicate, CudamiPredicatesClient> { | ||
|
||
@Test | ||
@DisplayName("can update without uuid (old behaviour)") | ||
public void testUpdateWithoutUuid() throws Exception { | ||
Predicate predicate = Predicate.builder().value("foo").build(); | ||
client.update(predicate); | ||
|
||
verifyHttpRequestByMethodRelativeUrlAndRequestBody("put", "/foo", predicate); | ||
} | ||
|
||
@Test | ||
@DisplayName("can update with uuid") | ||
public void testUpdateWithUuid() throws Exception { | ||
UUID uuid = UUID.randomUUID(); | ||
Predicate predicate = Predicate.builder().value("foo").uuid(uuid).build(); | ||
client.update(uuid, predicate); | ||
|
||
verifyHttpRequestByMethodRelativeUrlAndRequestBody("put", "/" + uuid, predicate); | ||
} | ||
|
||
@Test | ||
@DisplayName("can find all") | ||
public void testFindAll() throws Exception { | ||
client.getAll(); | ||
verifyHttpRequestByMethodAndRelativeURL("get", ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.