@Test(expected = IllegalArgumentException.class) public void testFailParse() { ScriptFragment.of(new FixtureValue(1)); }
public static ScriptFragment of(FixtureValue fixtureValue) { if (fixtureValue.getValue() instanceof String) { Matcher matcher = FIXTURE_VALUE_SCRIPT_PATTERN.matcher((CharSequence) fixtureValue.getValue()); if (matcher.find()) { String script = matcher.group(0); return of(script); } } throw new IllegalArgumentException(fixtureValue.toString() + " is not a script"); }
ScriptFragment { public static ScriptFragment of(FixtureValue fixtureValue) { if (fixtureValue.getValue() instanceof String) { Matcher matcher = FIXTURE_VALUE_SCRIPT_PATTERN.matcher((CharSequence) fixtureValue.getValue()); if (matcher.find()) { String script = matcher.group(0); return of(script); } } throw new IllegalArgumentException(fixtureValue.toString() + " is not a script"); } }
ScriptFragment { public static ScriptFragment of(FixtureValue fixtureValue) { if (fixtureValue.getValue() instanceof String) { Matcher matcher = FIXTURE_VALUE_SCRIPT_PATTERN.matcher((CharSequence) fixtureValue.getValue()); if (matcher.find()) { String script = matcher.group(0); return of(script); } } throw new IllegalArgumentException(fixtureValue.toString() + " is not a script"); } ScriptFragment(String methodName);  ScriptFragment(String methodName, String ... arguments); }
ScriptFragment { public static ScriptFragment of(FixtureValue fixtureValue) { if (fixtureValue.getValue() instanceof String) { Matcher matcher = FIXTURE_VALUE_SCRIPT_PATTERN.matcher((CharSequence) fixtureValue.getValue()); if (matcher.find()) { String script = matcher.group(0); return of(script); } } throw new IllegalArgumentException(fixtureValue.toString() + " is not a script"); } ScriptFragment(String methodName);  ScriptFragment(String methodName, String ... arguments); static ScriptFragment of(FixtureValue fixtureValue); static ScriptFragment of(String script); static boolean isScript(FixtureValue fixtureValue); String getMethodName(); List<String> getArguments(); boolean hasArguments(); ScriptFragment getNext(); void appendToTail(ScriptFragment scriptFragment); String toScriptString(); }
ScriptFragment { public static ScriptFragment of(FixtureValue fixtureValue) { if (fixtureValue.getValue() instanceof String) { Matcher matcher = FIXTURE_VALUE_SCRIPT_PATTERN.matcher((CharSequence) fixtureValue.getValue()); if (matcher.find()) { String script = matcher.group(0); return of(script); } } throw new IllegalArgumentException(fixtureValue.toString() + " is not a script"); } ScriptFragment(String methodName);  ScriptFragment(String methodName, String ... arguments); static ScriptFragment of(FixtureValue fixtureValue); static ScriptFragment of(String script); static boolean isScript(FixtureValue fixtureValue); String getMethodName(); List<String> getArguments(); boolean hasArguments(); ScriptFragment getNext(); void appendToTail(ScriptFragment scriptFragment); String toScriptString();  }