use of org.icij.datashare.text.Project in project datashare by ICIJ.
the class JooqRepositoryTest method test_save_read_project.
@Test
public void test_save_read_project() {
assertThat(repository.save(new Project("prj", Paths.get("/source"), "10.0.*.*"))).isTrue();
assertThat(repository.getProject("prj").name).isEqualTo("prj");
assertThat(repository.getProject("prj").sourcePath.toString()).isEqualTo("/source");
assertThat(repository.getProject("prj").allowFromMask).isEqualTo("10.0.*.*");
}
use of org.icij.datashare.text.Project in project datashare by ICIJ.
the class ProjectResourceTest method test_is_not_allowed.
@Test
public void test_is_not_allowed() {
when(repository.getProject("projectId")).thenReturn(new Project("projectId", "127.0.0.2"));
get("/api/project/isDownloadAllowed/projectId").should().respond(403);
}
Aggregations