MCPcopy Create free account
hub / github.com/apache/solr / testSimple

Method testSimple

solr/core/src/test/org/apache/solr/SampleTest.java:39–61  ·  view source on GitHub ↗

Demonstration of some simple ways to use the base class

()

Source from the content-addressed store, hash-verified

37
38 /** Demonstration of some simple ways to use the base class */
39 @Test
40 public void testSimple() {
41 assertU(
42 "Simple assertion that adding a document works",
43 adoc(
44 "id", "4055",
45 "subject", "Hoss the Hoss man Hostetter"));
46
47 /* alternate syntax, no label */
48 assertU(
49 adoc(
50 "id", "4056",
51 "subject", "Some Other Guy"));
52
53 assertU(commit());
54 assertU(optimize());
55
56 assertQ(
57 "couldn't find subject hoss",
58 req("subject:Hoss"),
59 "//result[@numFound=1]",
60 "//str[@name='id'][.='4055']");
61 }
62
63 /** Demonstration of some of the more complex ways to use the base class */
64 @Test

Callers

nothing calls this directly

Calls 6

assertUMethod · 0.45
adocMethod · 0.45
commitMethod · 0.45
optimizeMethod · 0.45
assertQMethod · 0.45
reqMethod · 0.45

Tested by

no test coverage detected