Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions core/src/test/java/tech/tablesaw/SortTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import tech.tablesaw.analytic.AnalyticQuery;
import tech.tablesaw.api.DoubleColumn;
import tech.tablesaw.api.IntColumn;
import tech.tablesaw.api.Table;
import tech.tablesaw.sorting.Sort;

Expand Down Expand Up @@ -149,4 +151,20 @@ public void createSortInvalidPrefixColumnDoesNotExist() {

assertEquals("Unrecognized Column: '>col2'", thrown.getMessage());
}

@Test
public void testGetOrderAndCreate0() throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test name should be more descriptive. what behavior is being tested? i.e. why do you expect an IllegalStateException to be thrown?

assertThrows(IllegalStateException.class, () -> {
Table table = Table.create("table1", IntColumn.create(" ales"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean for there to be a space in " ales"? if so, why?

AnalyticQuery.query()
.from(table)
.partitionBy("product", "region")
.orderBy("sales")
.rowsBetween()
.unboundedPreceding()
.andUnBoundedFollowing()
.sum("sales").as("sumSales")
.build();
});
}
}