Exemplo n.º 1
0
  @Test
  public void doesNotShowContentsOfThePropertiesProperty() throws IOException {
    context.checking(
        new Expectations() {
          {
            one(project).getProperties();
            will(returnValue(GUtil.map("prop", "value", "properties", "prop")));

            Sequence sequence = context.sequence("seq");

            one(renderer).addProperty("prop", "value");
            inSequence(sequence);
            one(renderer).addProperty("properties", "{...}");
            inSequence(sequence);
          }
        });

    task.generate(project);
  }
Exemplo n.º 2
0
  @Test
  public void passesEachProjectPropertyToRenderer() throws IOException {
    context.checking(
        new Expectations() {
          {
            one(project).getProperties();
            will(returnValue(GUtil.map("b", "value2", "a", "value1")));

            Sequence sequence = context.sequence("seq");

            one(renderer).addProperty("a", "value1");
            inSequence(sequence);

            one(renderer).addProperty("b", "value2");
            inSequence(sequence);
          }
        });

    task.generate(project);
  }