src/test/java/tech/zettervall/openlibrary/rxclient/models/BookDataTest.java
/**
     * Test the natural sorting of Book Objects.
     */
Test the natural sorting of Book Objects.
Test the natural sorting of Book Objects .
@Test
    public void compareTo() {
        List<BookData> books = new ArrayList<>();
        books.add(BookData.newBookDataForTesting("C"));
        books.add(BookData.newBookDataForTesting("A"));
        books.add(BookData.newBookDataForTesting("B"));
        Collections.sort(books);
        assertEquals("A", books.get(0).getTitle());
        assertEquals("B", books.get(1).getTitle());
        assertEquals("C", books.get(2).getTitle());
    }
@ Test public void compareTo ( ) { List < BookData > books = new ArrayList < > ( ) ; books . add ( BookData . newBookDataForTesting ( "C" ) ) ; books . add ( BookData . newBookDataForTesting ( "A" ) ) ; books . add ( BookData . newBookDataForTesting ( "B" ) ) ; Collections . sort ( books ) ; assertEquals ( "A" , books . get ( 0 ) . getTitle ( ) ) ; assertEquals ( "B" , books . get ( 1 ) . getTitle ( ) ) ; assertEquals ( "C" , books . get ( 2 ) . getTitle ( ) ) ; }
Test the natural sorting of Book Objects.
Test the natural sorting of Book Objects .
// A // B // C