Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Calling an editor with bad parameters in tests results in unhelpful error #444

Closed
ddgenome opened this issue Mar 17, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@ddgenome
Copy link
Contributor

If you do not provide proper parameters when calling and editor using editWith() in a test, you get:

  Running test scenario AddManifestYml should fail if parameters are missing
    Step AddManifestYml archive_name is my-rug-archive for AddManifestYml should fail if parameters are missing failed:
scala.NotImplementedError: an implementation is missing
  at scala.Predef$.$qmark$qmark$qmark(Predef.scala:230)
  at com.atomist.rug.test.gherkin.project.ProjectScenarioWorld.editWith(ProjectScenarioWorld.scala:85)
  at jdk.nashorn.internal.scripts.Script$Recompilation$674$5843AA$AddManifestYmlTest$cu1$restOf.L:1$L:121(.atomist/tests/project/AddManifestYmlTest.js:124)
  at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:661)
  at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
  at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
  at jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:117)
...

We should return a useful error.

I'm pretty sure this also prevents one from using the "parameters were invalid" WellKnownStep.

@ddgenome ddgenome added the bug label Mar 17, 2017
@ddgenome ddgenome self-assigned this Mar 17, 2017
@ddgenome
Copy link
Contributor Author

ddgenome commented Mar 17, 2017

ddgenome pushed a commit that referenced this issue Mar 18, 2017
Pass the InvalidParameterException up through editor calls so they get
recorded and you do not hit `???` and blow up when checking if the
editor checks parameters.

Fixes #444
ddgenome pushed a commit that referenced this issue Mar 18, 2017
Pass the InvalidParameterException up through editor calls so they get
recorded and you do not hit `???` and blow up when checking if the
editor checks parameters.

Fixes #444
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant