StandAloneScenarioScript extends Script { public void view(Closure<?> body) { body.setDelegate(_viewDelegate); body.call(); } StandAloneScenarioScript(); void view(Closure<?> body); void shockGrid(Closure<?> body); void shockList(Closure<?> body); void scenarios(Closure<?> body);  }
@Test public void view() { String scriptText = "view {\n" + " name 'an example view'\n" + " server 'svr:8080'\n" + "}"; StandAloneScenarioScript script = createScript(scriptText); ViewDelegate viewDelegate = script.getViewDelegate(); assertEquals("an example view", viewDelegate.getName()); assertEquals("svr:8080", viewDelegate.getServer()); }