This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix editor testing with bad parameters
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
- Loading branch information
David Dooling
committed
Mar 18, 2017
1 parent
ff43fe5
commit 9b15080
Showing
6 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/atomist/rug/test/gherkin/project/EditorWithBadParametersSteps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Project } from "@atomist/rug/model/Core" | ||
import { ProjectEditor } from "@atomist/rug/operations/ProjectEditor" | ||
import { Given, When, Then, ProjectScenarioWorld } from "@atomist/rug/test/project/Core" | ||
|
||
import { AlpEditor } from "../../editors/AlpEditors" | ||
|
||
Given("a visionary leader", p => { | ||
p.addFile("Gough", "Maintain the rage"); | ||
}) | ||
When("politics takes its course", (p, w) => { | ||
let world = w as ProjectScenarioWorld; | ||
world.editWith(world.editor("AlpEditorWithParameters"), {heir: "Malcolm0Fraser"}); | ||
}); | ||
Then("the rage has a name", p => { | ||
let name = p.name(); | ||
return name != null && name != "" && name.length > 0; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters