Skip to content

system-lambda-1.1.0

@stefanbirkner stefanbirkner tagged this 17 Aug 06:39
This allows to write more precise and readable tests. The assertion can
be outside of the "withEnvironmentVariable" statement and "execute" can
be called with a one-line Lambda expression. E.g.

    @Test
    void execute_code_with_environment_variables(
    ) throws Exception {
      String value = withEnvironmentVariable("key", "the value")
        .execute(() -> System.getenv("key"));
      assertEquals("the value", value);
    }
Assets 2
Loading