MCPcopy Create free account
hub / github.com/GateNLP/gate-core / testCompareTo

Method testCompareTo

src/test/java/gate/corpora/TestDocument.java:83–97  ·  view source on GitHub ↗

Test ordering

()

Source from the content-addressed store, hash-verified

81
82 /** Test ordering */
83 public void testCompareTo() throws Exception{
84 Document doc1 = null;
85 Document doc2 = null;
86 Document doc3 = null;
87
88
89 doc1 = Factory.newDocument(new URL(testServer + "tests/def"));
90 doc2 = Factory.newDocument(new URL(testServer + "tests/defg"));
91 doc3 = Factory.newDocument(new URL(testServer + "tests/abc"));
92
93 assertTrue(doc1.compareTo(doc2) < 0);
94 assertTrue(doc1.compareTo(doc1) == 0);
95 assertTrue(doc1.compareTo(doc3) > 0);
96
97 } // testCompareTo()
98
99 /** Test loading of the original document content */
100

Callers

nothing calls this directly

Calls 2

newDocumentMethod · 0.95
compareToMethod · 0.65

Tested by

no test coverage detected