[java-libglom] DocumentTest: More tests of the report structure.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-libglom] DocumentTest: More tests of the report structure.
- Date: Fri, 13 Apr 2012 12:19:04 +0000 (UTC)
commit 63d9f362510062ddee4878326872f8fd66fdf067
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 13 14:18:57 2012 +0200
DocumentTest: More tests of the report structure.
* src/test/java/org/glom/libglom/tests/DocumentTest.java
ChangeLog | 6 ++++++
.../java/org/glom/libglom/tests/DocumentTest.java | 19 +++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d3eb577..1becff3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-13 Murray Cumming <murrayc murrayc- com>
+
+ DocumentTest: More tests of the report structure.
+
+ * src/test/java/org/glom/libglom/tests/DocumentTest.java
+
1.21.8:
2012-03-29 Murray Cumming <murrayc murrayc com>
diff --git a/src/test/java/org/glom/libglom/tests/DocumentTest.java b/src/test/java/org/glom/libglom/tests/DocumentTest.java
index a3c6809..fc862a7 100644
--- a/src/test/java/org/glom/libglom/tests/DocumentTest.java
+++ b/src/test/java/org/glom/libglom/tests/DocumentTest.java
@@ -334,6 +334,25 @@ public class DocumentTest {
LayoutGroup groupSecondaries = groupby.get_secondary_fields();
assertTrue(groupSecondaries != null);
+
+ LayoutItemVector innerItems = groupby.get_items();
+ assertTrue(innerItems != null);
+ final int numInnerItems = safeLongToInt(innerItems.size());
+ assertEquals(2, numInnerItems);
+
+ layoutItem = layoutItems.get(0);
+ assertTrue(layoutItem != null);
+ LayoutItem_Field field = LayoutItem_Field.cast_dynamic(layoutItem);
+ assertTrue(field != null);
+ assertThat(field.get_name(), is("name"));
+ assertThat(field.get_glom_type(), is(Field.glom_field_type.TYPE_TEXT));
+
+ layoutItem = layoutItems.get(1);
+ assertTrue(layoutItem != null);
+ field = LayoutItem_Field.cast_dynamic(layoutItem);
+ assertTrue(field != null);
+ assertThat(field.get_name(), is("year"));
+ assertThat(field.get_glom_type(), is(Field.glom_field_type.TYPE_NUMERIC));
}
// Test thread class that runs all the tests.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]