@Test public void parseCollectionConfig() throws Exception { ConfigurationMetadata metadata = compile(SimpleCollectionProperties.class); // getter and setter assertThat(metadata).has(Metadata.withProperty("collection.integers-to-names", "java.util.Map<java.lang.Integer,java.lang.String>")); assertThat(metadata).has(Metadata.withProperty("collection.longs", "java.util.Collection<java.lang.Long>")); assertThat(metadata).has(Metadata.withProperty("collection.floats", "java.util.List<java.lang.Float>")); // getter only assertThat(metadata).has(Metadata.withProperty("collection.names-to-integers", "java.util.Map<java.lang.String,java.lang.Integer>")); assertThat(metadata).has(Metadata.withProperty("collection.bytes", "java.util.Collection<java.lang.Byte>")); assertThat(metadata).has(Metadata.withProperty("collection.doubles", "java.util.List<java.lang.Double>")); }
@Test public void parseCollectionConfig() throws Exception { ConfigurationMetadata metadata = compile(SimpleCollectionProperties.class); // getter and setter assertThat(metadata, containsProperty("collection.integers-to-names", "java.util.Map<java.lang.Integer,java.lang.String>")); assertThat(metadata, containsProperty("collection.longs", "java.util.Collection<java.lang.Long>")); assertThat(metadata, containsProperty("collection.floats", "java.util.List<java.lang.Float>")); // getter only assertThat(metadata, containsProperty("collection.names-to-integers", "java.util.Map<java.lang.String,java.lang.Integer>")); assertThat(metadata, containsProperty("collection.bytes", "java.util.Collection<java.lang.Byte>")); assertThat(metadata, containsProperty("collection.doubles", "java.util.List<java.lang.Double>")); }