@Test public void testComplexMultiDataSetRequestEqualsAndHashCodeAgainstStringAndObject() { // Note that the tests on hashCode here are beyond the contract requirements of hashCode, we're saying they must differ if the object differs, which is // generally good, but not required. MultiDataSetRequest request1 = MultiDataSetRequest.Builder .of(QuandlCodeRequest.allColumns("CODE/CODE")) .withFrequency(Frequency.NONE) .withMaxRows(49) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .build(); Assert.assertNotEquals(request1, "Hello"); Assert.assertNotEquals(request1, new Object()); }
@Test(expectedExceptions = QuandlRuntimeException.class) public final void testMultiDataSetRequestSortOrder() { MultiDataSetRequest.Builder.of(QuandlCodeRequest.allColumns("Hello")).withSortOrder(null).build(); }
.withFrequency(Frequency.NONE) .withMaxRows(49) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .withFrequency(Frequency.NONE) .withMaxRows(49) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .withFrequency(Frequency.NONE) .withMaxRows(49) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .withFrequency(Frequency.NONE) .withMaxRows(49) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .withSortOrder(SortOrder.ASCENDING) .withStartDate(LocalDate.of(2010, 1, 1)) .withEndDate(LocalDate.of(2011, 1, 1)) .of(QuandlCodeRequest.allColumns("CODE/CODE"))