@Test public void getAllItems() { RemoteCallback<List<String>> testingCallbackSpy = spy(new RemoteCallback<List<String>>() { @Override public void callback(List<String> response) { assertEquals(files.length, response.size()); } }); kogitoResourceContentService.getAllItems(testingCallbackSpy, mock(ErrorCallback.class)); verify(resourceContentServiceMock, times(1)).list(eq(ALL_PATTERN)); verify(testingCallbackSpy, times(1)).callback(isA(List.class)); }
public void getAllItems(final RemoteCallback<List<String>> callback, final ErrorCallback<Object> errorCallback) { getFilteredItems("*", callback, errorCallback); }
KogitoResourceContentService { public void getAllItems(final RemoteCallback<List<String>> callback, final ErrorCallback<Object> errorCallback) { getFilteredItems("*", callback, errorCallback); } }
KogitoResourceContentService { public void getAllItems(final RemoteCallback<List<String>> callback, final ErrorCallback<Object> errorCallback) { getFilteredItems("*", callback, errorCallback); } private  KogitoResourceContentService(); @Inject  KogitoResourceContentService(final ResourceContentService resourceContentService,
                                        final Promises promises); }
KogitoResourceContentService { public void getAllItems(final RemoteCallback<List<String>> callback, final ErrorCallback<Object> errorCallback) { getFilteredItems("*", callback, errorCallback); } private  KogitoResourceContentService(); @Inject  KogitoResourceContentService(final ResourceContentService resourceContentService,
                                        final Promises promises); void loadFile(final String fileUri,
                         final RemoteCallback<String> callback,
                         final ErrorCallback<Object> errorCallback); void getAllItems(final RemoteCallback<List<String>> callback,
                            final ErrorCallback<Object> errorCallback); void getFilteredItems(final String pattern,
                                 final RemoteCallback<List<String>> callback,
                                 final ErrorCallback<Object> errorCallback); Promise<String[]> getFilteredItems(final String pattern,
                                              final ResourceListOptions options); Promise<String> loadFile(final String fileUri); }
KogitoResourceContentService { public void getAllItems(final RemoteCallback<List<String>> callback, final ErrorCallback<Object> errorCallback) { getFilteredItems("*", callback, errorCallback); } private  KogitoResourceContentService(); @Inject  KogitoResourceContentService(final ResourceContentService resourceContentService,
                                        final Promises promises); void loadFile(final String fileUri,
                         final RemoteCallback<String> callback,
                         final ErrorCallback<Object> errorCallback); void getAllItems(final RemoteCallback<List<String>> callback,
                            final ErrorCallback<Object> errorCallback); void getFilteredItems(final String pattern,
                                 final RemoteCallback<List<String>> callback,
                                 final ErrorCallback<Object> errorCallback); Promise<String[]> getFilteredItems(final String pattern,
                                              final ResourceListOptions options); Promise<String> loadFile(final String fileUri);  }