@Test(expected = IllegalArgumentException.class) public void testWalkNullApplication() { WadlHandler mockHandler = mock(WadlHandler.class); WadlWalker ww = new WadlWalker(mockHandler); ww.walk(null); }
public void walk(final Application application) { if (application == null) { throw new IllegalArgumentException("application"); } handler.beginApplication(application); try { final Resources resources = application.getResources(); final Stack<Resource> ancestors = new Stack<Resource>(); for (final Resource resource : resources.getResources()) { walkResource(resource, resources, application, ancestors); } } finally { handler.endApplication(application); } }
WadlWalker { public void walk(final Application application) { if (application == null) { throw new IllegalArgumentException("application"); } handler.beginApplication(application); try { final Resources resources = application.getResources(); final Stack<Resource> ancestors = new Stack<Resource>(); for (final Resource resource : resources.getResources()) { walkResource(resource, resources, application, ancestors); } } finally { handler.endApplication(application); } } }
WadlWalker { public void walk(final Application application) { if (application == null) { throw new IllegalArgumentException("application"); } handler.beginApplication(application); try { final Resources resources = application.getResources(); final Stack<Resource> ancestors = new Stack<Resource>(); for (final Resource resource : resources.getResources()) { walkResource(resource, resources, application, ancestors); } } finally { handler.endApplication(application); } } WadlWalker(final WadlHandler handler); }
WadlWalker { public void walk(final Application application) { if (application == null) { throw new IllegalArgumentException("application"); } handler.beginApplication(application); try { final Resources resources = application.getResources(); final Stack<Resource> ancestors = new Stack<Resource>(); for (final Resource resource : resources.getResources()) { walkResource(resource, resources, application, ancestors); } } finally { handler.endApplication(application); } } WadlWalker(final WadlHandler handler); void walk(final Application application); }
WadlWalker { public void walk(final Application application) { if (application == null) { throw new IllegalArgumentException("application"); } handler.beginApplication(application); try { final Resources resources = application.getResources(); final Stack<Resource> ancestors = new Stack<Resource>(); for (final Resource resource : resources.getResources()) { walkResource(resource, resources, application, ancestors); } } finally { handler.endApplication(application); } } WadlWalker(final WadlHandler handler); void walk(final Application application);  }