Razi Kheir
07/10/2019, 6:27 AMval filesystem: Environment = Environment.from(File("test.yml"))
var testString
var testStringLens: BiDiLens<Environment, String?> = EnvironmentKey.string().optional("TESTKEY")
testString = environment[testStringLens]
Only returns the string up to the first comma.
Example: (yml)
TESTKEY: “test1 , test2”
Example: (properties)
TESTKEY= “test1, test2"
Will only return test1 as the string.
How do I solve this? do I need to escape the string somehow?
I’m trying to actually read a json from a file under a key.Razi Kheir
07/10/2019, 6:49 AMs4nchez
07/10/2019, 6:52 AMval lens = EnvironmentKey.optional("SOME_VALUE")
assertThat(lens(Environment.from("SOME_VALUE" to "80,81")), equalTo("80,81"))
This assertion currently fails with actual being 80
rather than 80,81
So I say for now use the multi and we'll look into why we're getting such behaviourRazi Kheir
07/10/2019, 6:52 AMs4nchez
07/10/2019, 6:53 AMRazi Kheir
07/10/2019, 6:56 AMdave
07/10/2019, 7:35 AMdave
07/10/2019, 7:37 AM