@Test public void methodIdentNull() { Mockito.doReturn(1L).when(invocationSeuence).getMethodIdent(); Mockito.doReturn(null).when(cachedDataService).getMethodIdentForId(anyInt()); String[] values = valueSource.getStringValues(invocationSeuence, cachedDataService); assertThat(values, is(notNullValue())); assertThat(values.length, is(equalTo(0))); } }
return new MethodParameterValueSource(parameterIndexSpinner.getSelection(), methodSignatureText.getText()); case METHOD_SIGNATURE: return new MethodSignatureValueSource(); case HTTP_REQUEST_METHOD: return new HttpRequestMethodValueSource();
break; case METHOD_SIGNATURE: expression.setStringValueSource(new MethodSignatureValueSource()); break; case METHOD_PARAMETER:
@Test public void retrieveURI() { methodIdent = new MethodIdent(); methodIdent.setPackageName(PACKAGE); methodIdent.setClassName(CLASS); methodIdent.setMethodName(METHOD); Mockito.doReturn(1L).when(invocationSeuence).getMethodIdent(); Mockito.doReturn(methodIdent).when(cachedDataService).getMethodIdentForId(anyInt()); String[] values = valueSource.getStringValues(invocationSeuence, cachedDataService); assertThat(values, hasItemInArray(PACKAGE + "." + CLASS + "." + METHOD + "()")); }