Skip to content

Commit

Permalink
Code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin committed Sep 19, 2024
1 parent f6ba2ae commit 2764557
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 141 deletions.
2 changes: 2 additions & 0 deletions src/test/java/fr/igred/omero/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void testRootConnection() throws ServiceException {
try {
testRoot.disconnect();
} catch (RuntimeException ignored) {
// IGNORED
}
assertEquals(0L, id);
assertEquals(GROUP1.id, groupId);
Expand All @@ -81,6 +82,7 @@ void testUserConnection() throws ServiceException {
try {
testUser.disconnect();
} catch (RuntimeException ignored) {
// IGNORED
}
assertEquals(USER1.id, id);
assertEquals(GROUP1.id, groupId);
Expand Down
1 change: 1 addition & 0 deletions src/test/java/fr/igred/omero/SudoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ void testSudoTag() throws Exception {
test.disconnect();
root.disconnect();
} catch (RuntimeException ignored) {
// IGNORED
}

assertNotEquals(0, images.size());
Expand Down
248 changes: 124 additions & 124 deletions src/test/java/fr/igred/omero/annotations/ImageJTableTest.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import fr.igred.omero.UserTest;
import fr.igred.omero.repository.PixelsWrapper;
import ome.units.UNITS;
import omero.model.Length;
import omero.model.Time;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void testGetRefPlateId() throws Exception {
PlateAcquisitionWrapper acq = plate.getPlateAcquisitions().get(0);
assertEquals(1, acq.getRefPlateId());
acq.setRefPlateId(-1L);
// Saving does not work: acq.saveAndUpdate(client);
// Saving does not work: "acq.saveAndUpdate(client);" does nothing
assertEquals(-1L, acq.getRefPlateId());
}

Expand Down
22 changes: 7 additions & 15 deletions src/test/java/fr/igred/omero/repository/PlateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,18 @@ void testGetWells() throws Exception {


@Test
void testGetImages() throws Exception {
PlateWrapper plate = client.getPlate(PLATE1.id);
List<ImageWrapper> images = plate.getImages(client);
assertEquals(36, images.size());
}


@Test
void testGetWellsFromPlate() throws Exception {
PlateWrapper plate = client.getPlate(PLATE1.id);
void testGetWells2() throws Exception {
PlateWrapper plate = client.getPlate(PLATE2.id);
List<WellWrapper> wells = plate.getWells(client);
assertEquals(9, wells.size());
assertEquals(4, wells.size());
}


@Test
void testGetWellsFromPlate2() throws Exception {
PlateWrapper plate = client.getPlate(PLATE2.id);
List<WellWrapper> wells = plate.getWells(client);
assertEquals(4, wells.size());
void testGetImages() throws Exception {
PlateWrapper plate = client.getPlate(PLATE1.id);
List<ImageWrapper> images = plate.getImages(client);
assertEquals(36, images.size());
}


Expand Down
1 change: 1 addition & 0 deletions src/test/java/fr/igred/omero/util/WrapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public Object getContent() {

@Override
public void setContent(Object content) {
// DO NOTHING FOR THIS FAKE OBJECT
}


Expand Down

0 comments on commit 2764557

Please sign in to comment.