@Test public void should_associate_container_property_values_with_its_id() throws Exception { assertThat( propertyValuesVisitor.visit( aContainer() .withReference("container-id") .withPropertyValue("foo", "bar", "baz") .build())) .containsExactly(entry("container-id", singletonMap("foo", propertyValue))); }
@Test public void should_associate_component_property_values_contained_in_a_previewable_with_its_id() throws Exception { assertThat( propertyValuesVisitor.visit( aPage() .with( aComponent() .withReference("component-id") .withPropertyValue("foo", "bar", "baz")) .build())) .containsExactly(entry("component-id", singletonMap("foo", propertyValue))); }
@Test public void should_associate_component_parameter_values_contained_in_a_formcontainer_with_its_id() throws Exception { assertThat( propertyValuesVisitor.visit( aFormContainer() .with( aContainer() .with( aComponent() .withReference("component-id") .withPropertyValue("foo", "bar", "baz")) .withReference("container-id") .build()) .withReference("formcontainer-id") .build())) .containsOnly( entry("formcontainer-id", emptyMap()), entry("container-id", emptyMap()), entry("component-id", singletonMap("foo", propertyValue))); }