Ejemplo n.º 1
0
  @Test
  public void shouldSplitPerCurrency() {
    Splitter splitter = SplitterBuilder.from("currency");

    Split split = splitter.split(positions);

    assertThat(split.size(), is(2));
    hasGroup(split, "CHF");
    hasGroup(split, "USD");
    assertThat(split.positions("CHF").size(), is(3));
    assertThat(split.positions("USD").size(), is(1));
  }
Ejemplo n.º 2
0
  @Test
  public void shouldCreateASplit() {
    Split split = new Split();
    split.add("CHF", positions);
    split.add("USD", new Positions());

    assertThat(split.size(), is(2));
    hasGroup(split, "CHF");
    hasGroup(split, "USD");
    assertThat(split.positions("CHF").size(), is(4));
    assertThat(split.positions("USD").size(), is(0));
  }