@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentInputs() { inputs2.put("Some input", "value"); request = new FunctionRequest(function, validPathLocation1, workspace1, inputs); request2 = new FunctionRequest(function, validPathLocation1, workspace1, inputs2); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentLocations() { request = new FunctionRequest(function, validPathLocation1, workspace1, inputs); request2 = new FunctionRequest(function, validPathLocation2, workspace1, inputs); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentWorkspaceNames() { request = new FunctionRequest(function, validPathLocation1, workspace1, inputs); request2 = new FunctionRequest(function, validPathLocation1, workspace2, inputs); assertThat(request.equals(request2), is(false)); } }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentFunctions() { @SuppressWarnings( "serial" ) Function function2 = new Function() { @Override public void run( FunctionContext context ) { ran = true; context.setOutput("success", Boolean.TRUE); } }; request = new FunctionRequest(function, validPathLocation1, workspace1, inputs); request2 = new FunctionRequest(function2, validPathLocation1, workspace1, inputs); assertThat(request.equals(request2), is(false)); }