/**
* 単一のプロパティに関するテスト。
*/
@Test
public void simple() {
TableModelDescription desc = new TableModelBuilder("Example")
.add(null, "value", PropertyTypeKind.INT)
.toDescription();
assertThat(desc.getReference().getSimpleName(), is("Example"));
List<ModelProperty> properties = desc.getProperties();
assertThat(properties.size(), is(1));
ModelProperty value = properties.get(0);
assertThat(value.getName(), is("value"));
assertThat(value.getType().getKind(), is(PropertyTypeKind.INT));
assertThat(value.getJoined(), is(nullValue()));
Source valueSrc = value.getFrom();
assertThat(valueSrc.getAggregator(), is(Aggregator.IDENT));
assertThat(valueSrc.getDeclaring(), is(desc.getReference()));
assertThat(valueSrc.getName(), is("value"));
assertThat(valueSrc.getType().getKind(), is(PropertyTypeKind.INT));
assertThat(valueSrc.getAttributes().size(), is(0));
}