-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…#220) Closes #199 This adds two new config options that allow to computing deeply nested fields (with the value that corresponds to the source value under the config path). Example: ```scala case class SourceToplevel1(level1: Option[SourceLevel1]) case class SourceLevel1(level2: Option[SourceLevel2]) case class SourceLevel2(level3: SourceLevel3) case class SourceLevel3(int: Int) case class DestToplevel1(level1: Option[DestLevel1]) case class DestLevel1(level2: Option[DestLevel2]) case class DestLevel2(level3: Option[DestLevel3]) case class DestLevel3(int: Long) val source = SourceToplevel1(Some(SourceLevel1(Some(SourceLevel2(SourceLevel3(1)))))) val expected = DestToplevel1(Some(DestLevel1(Some(DestLevel2(Some(DestLevel3(11))))))) assertTransformsConfigured(source, expected)( Field.computedDeep(_.level1.element.level2.element.level3.element.int, (int: Int) => int.toLong + 10) ) ```
- Loading branch information
Showing
17 changed files
with
923 additions
and
86 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
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
Oops, something went wrong.