Skip to content

Commit

Permalink
Build Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-aga authored and Rishi Agarwal committed Mar 30, 2021
1 parent b95cd9f commit 4b1b6b5
Showing 1 changed file with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public class TableTypeTest {
@Test
void testGetAndSetField() throws Exception {
Table testTable = Table.builder()
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.name("dim1")
.type(Type.BOOLEAN)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand Down Expand Up @@ -177,7 +177,7 @@ void testMeasureAnnotations() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.measure(Measure.builder()
.measures(Arrays.asList(Measure.builder()
.type(Type.MONEY)
.category("category1")
.definition("SUM{{ price}}")
Expand All @@ -187,7 +187,7 @@ void testMeasureAnnotations() throws Exception {
.readAccess("Admin")
.description("A measure")
.tags(tags)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand Down Expand Up @@ -217,7 +217,7 @@ void testDimensionAnnotations() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.type(Type.TEXT)
.category("category1")
.definition("{{region}}")
Expand All @@ -229,7 +229,7 @@ void testDimensionAnnotations() throws Exception {
.tags(tags)
.cardinality("small")
.tableSource("region.id")
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand Down Expand Up @@ -258,11 +258,11 @@ void testDimensionTableValues() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.type(Type.COORDINATE)
.name("location")
.values(values)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand All @@ -281,7 +281,7 @@ void testTimeDimensionAnnotations() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.type(Type.TIME)
.category("category1")
.definition("{{createdOn }}")
Expand All @@ -291,7 +291,7 @@ void testTimeDimensionAnnotations() throws Exception {
.readAccess("Admin")
.description("A time dimension")
.tags(tags)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand Down Expand Up @@ -323,19 +323,19 @@ void testMultipleTimeDimensionGrains() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.type(Type.TIME)
.definition("{{createdOn}}")
.name("createdOn")
.grain(Grain.builder()
.grains(Arrays.asList(Grain.builder()
.sql("some sql")
.type(Grain.GrainType.DAY)
.build())
.grain(Grain.builder()
.build(),
Grain.builder()
.sql("some other sql")
.type(Grain.GrainType.YEAR)
.build())
.build())
.build()))
.build()))
.build();

TableType testType = new TableType(testTable);
Expand All @@ -356,21 +356,21 @@ void testMultipleTimeDimensionGrains() throws Exception {
void testJoinField() throws Exception {
Table testTable1 = Table.builder()
.name("table1")
.join(Join.builder()
.joins(Arrays.asList(Join.builder()
.definition("{{id }} = {{ table2.id}}")
.kind(Join.Kind.TOONE)
.type(Join.Type.INNER)
.name("join1")
.to("table2.dim2")
.build())
.build()))
.build();

Table testTable2 = Table.builder()
.name("table2")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.name("dim2")
.type(Type.BOOLEAN)
.build())
.build()))
.build();

TableType testType1 = new TableType(testTable1);
Expand All @@ -397,11 +397,11 @@ void testHiddenDimension() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.dimension(Dimension.builder()
.dimensions(Arrays.asList(Dimension.builder()
.name("dim1")
.type(Type.BOOLEAN)
.hidden(true)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand All @@ -420,11 +420,11 @@ void testHiddenMeasure() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.measure(Measure.builder()
.measures(Arrays.asList(Measure.builder()
.name("measure1")
.type(Type.BOOLEAN)
.hidden(true)
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand All @@ -443,11 +443,11 @@ void testInvalidResolver() throws Exception {
Table testTable = Table.builder()
.table("table1")
.name("Table")
.measure(Measure.builder()
.measures(Arrays.asList(Measure.builder()
.name("measure1")
.type(Type.BOOLEAN)
.queryPlanResolver("does.not.exist.class")
.build())
.build()))
.build();

TableType testType = new TableType(testTable);
Expand Down

0 comments on commit 4b1b6b5

Please sign in to comment.