-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #127 - Fix filters applying actions despite criteria not matching
- Loading branch information
Thierry Lacour
committed
Mar 28, 2019
1 parent
a8ee216
commit 79f109f
Showing
8 changed files
with
55 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ build/ | |
gradle-app.setting | ||
!gradle-wrapper.jar | ||
/.nb-gradle/ | ||
output/ | ||
|
||
bin/ | ||
.project | ||
|
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
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
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,41 @@ | ||
package togit.context.dummy | ||
|
||
import org.junit.Test | ||
import togit.Executor | ||
import togit.TestHelper | ||
import togit.migration.MigrationManager | ||
import togit.migration.sources.dummy.DummySource | ||
import togit.migration.targets.dummy.DummyTarget | ||
|
||
class GHI127 { | ||
|
||
private static void runTest() { | ||
new Executor().execute(TestHelper.tempCommandFile(testScript()).absolutePath) | ||
} | ||
|
||
static String testScript() { | ||
"""\ | ||
source('dummy') | ||
target('dummy') | ||
migrate(false, true) { | ||
filters { | ||
filter { | ||
criteria { | ||
custom { current, all -> current.identifier == "foo" } | ||
} | ||
actions { | ||
custom { println "blip" } | ||
} | ||
} | ||
} | ||
}""".stripIndent() | ||
} | ||
|
||
@Test | ||
void testCopy() { | ||
runTest() | ||
MigrationManager manager = MigrationManager.instance | ||
assert manager.plan.steps.size() == 1 | ||
assert manager.plan.steps.foo.actions.size() == 1 | ||
} | ||
} |