Last active
October 3, 2015 04:48
-
-
Save joel-costigliola/2393444 to your computer and use it in GitHub Desktop.
Regexp to migrate Fest 1.4 onProperty usage to Fest 2.0 extractProperty + from with
This file contains hidden or 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
Search with regexp: assertThat\((.*?)\).onProperty\((.*?)\) | |
Replace by : assertThat(extractProperty(\2).from(\1)) | |
For example, it will change: | |
assertThat(fellowshipOfTheRing).onProperty("name").contains("Boromir", "Gandalf", "Frodo", "Legolas"); // Fest 1.4 | |
To : | |
assertThat(extractProperty("name").from(fellowshipOfTheRing)).contains("Boromir", "Gandalf", "Frodo", "Legolas"); // Fest 2.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment