Created
July 12, 2012 10:00
-
-
Save fffej/3097136 to your computer and use it in GitHub Desktop.
Top level.
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
@Test | |
public void test() { | |
Environment env = new Environment(); | |
env.register(assign($("a"), plus($("b"), $("c")))); | |
env.register(assign($("c"), multiply($(2), $("d")))); | |
env.register(assign($("b"), $(3))); | |
env.register(assign($("d"), $(2))); | |
Assert.assertThat(env.valueOf($("a")), equalTo(7)); | |
Assert.assertThat(env.valueOf($("b")), equalTo(3)); | |
Assert.assertThat(env.valueOf($("c")), equalTo(4)); | |
Assert.assertThat(env.valueOf($("d")), equalTo(2)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment