Skip to content

Commit

Permalink
Add test and remove testing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
minnerbe committed Apr 9, 2024
1 parent eff54f2 commit caf5548
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,12 @@ public static class Parameters extends CommandLineParameters {

@Parameter(
names = "--renderingOrder",
description = "Rendering order",
required = false)
description = "Rendering order")
public RenderingOrder renderingOrder = RenderingOrder.HORIZONTAL_SCAN;
}

public static void main(final String[] args) {
final String[] xargs = {
"--baseDataUrl", "http://renderer-dev.int.janelia.org:8080/render-ws/v1",
"--owner", "hess_wafer_53b",
"--project", "cut_070_to_079",
"--stack", "c070_s032_v01_align_ic",
"--targetStack", "c070_s032_v01_mi_reordering_test_scan_order"
};
final ClientRunner clientRunner = new ClientRunner(xargs) {
final ClientRunner clientRunner = new ClientRunner(args) {
@Override
public void runClient(final String[] args) throws Exception {

Expand Down Expand Up @@ -156,8 +148,8 @@ public enum RenderingOrder {

public String serialNumberFor(final String tileId) {
final String[] tileIdComponents = TILE_ID_SEPARATOR.split(tileId);
final int mFov = Integer.parseInt(tileIdComponents[1]);
final int sFov = Integer.parseInt(tileIdComponents[2]);
final int mFov = Integer.parseInt(tileIdComponents[MFOV_INDEX]);
final int sFov = Integer.parseInt(tileIdComponents[SFOV_INDEX]);
return String.format("%04d", mAndSFovToSerialNumber.applyAsInt(mFov, sFov));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.janelia.render.client;

import org.janelia.render.client.parameter.CommandLineParameters;
import org.junit.Test;

/**
* Tests the {@link TileReorderingClient} class.
*
* @author Michael Innerberger
*/
public class TileReorderingClientTest {

@Test
public void testParameterParsing() throws Exception {
CommandLineParameters.parseHelp(new TileReorderingClient.Parameters());
}

public static void main(final String[] args) {

final String[] effectiveArgs = args.length > 0 ? args : new String[] {
"--baseDataUrl", "http://renderer-dev.int.janelia.org:8080/render-ws/v1",
"--owner", "hess_wafer_53d",
"--project", "slab_120_to_129",
"--stack", "s127_m232_align_mi_ic_test1",
"--targetStack", "s127_m232_align_mi_reordering_test_horizontal_scan"
};

TileReorderingClient.main(effectiveArgs);
}
}

0 comments on commit caf5548

Please sign in to comment.