-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sharon Luong
committed
Nov 16, 2023
1 parent
b9d0007
commit 471b27c
Showing
2 changed files
with
37 additions
and
1 deletion.
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
36 changes: 36 additions & 0 deletions
36
...-app/src/test/java/edu/unc/lib/boxc/web/services/rest/ImageProxyServerControllerTest.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 |
---|---|---|
@@ -1,7 +1,43 @@ | ||
package edu.unc.lib.boxc.web.services.rest; | ||
|
||
import edu.unc.lib.boxc.auth.api.models.AccessGroupSet; | ||
import edu.unc.lib.boxc.auth.api.services.AccessControlService; | ||
import edu.unc.lib.boxc.auth.fcrepo.models.AccessGroupSetImpl; | ||
import edu.unc.lib.boxc.web.services.processing.ImageServerProxyService; | ||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.Mock; | ||
|
||
import static org.mockito.MockitoAnnotations.openMocks; | ||
|
||
/** | ||
* @author snluong | ||
*/ | ||
public class ImageProxyServerControllerTest { | ||
private static final String IMAGE_SERVER_PROXY_PATH = "http://cantaloupe.com/iiif/v3/"; | ||
private static final String BASE_IIIF_V3_PATH = "http://example.com/iiif/v3/"; | ||
private final static String USERNAME = "test_user"; | ||
private final static AccessGroupSet GROUPS = new AccessGroupSetImpl("adminGroup"); | ||
private AutoCloseable closeable; | ||
private ImageServerProxyService imageServerProxyService; | ||
|
||
@InjectMocks | ||
private ImageServerProxyController imageServerProxyController; | ||
@Mock | ||
private AccessControlService accessControlService; | ||
|
||
|
||
@BeforeEach | ||
public void setup() { | ||
closeable = openMocks(this); | ||
imageServerProxyService = new ImageServerProxyService(); | ||
imageServerProxyService.setImageServerProxyBasePath(IMAGE_SERVER_PROXY_PATH); | ||
imageServerProxyService.setBaseIiifv3Path(BASE_IIIF_V3_PATH); | ||
} | ||
|
||
@AfterEach | ||
void closeService() throws Exception { | ||
closeable.close(); | ||
} | ||
} |