Revision 8763
Added by ben leinfelder about 10 years ago
DatapackageSummarizerTest.java | ||
---|---|---|
81 | 81 |
// suite.addTest(new DatapackageSummarizerTest("testGenerateAnnotation")); |
82 | 82 |
// suite.addTest(new DatapackageSummarizerTest("testStandaloneAnnotation")); |
83 | 83 |
suite.addTest(new DatapackageSummarizerTest("testIndexAnnotations")); |
84 |
// suite.addTest(new DatapackageSummarizerTest("testGenerateRandomAnnotation")); |
|
85 | 84 |
return suite; |
86 | 85 |
} |
87 | 86 |
|
... | ... | |
116 | 115 |
* @throws Exception |
117 | 116 |
*/ |
118 | 117 |
public void testGenerateAnnotation() throws Exception { |
119 |
this.testGenerateAnnotation_base(false); |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* Generate a bunch of random annotations |
|
124 |
* @throws Exception |
|
125 |
*/ |
|
126 |
public void testGenerateRandomAnnotation() throws Exception { |
|
127 |
for (int i = 0; i < 5; i++) { |
|
128 |
this.testGenerateAnnotation_base(true); |
|
129 |
} |
|
130 |
} |
|
131 |
|
|
132 |
private void testGenerateAnnotation_base(boolean randomize) throws Exception { |
|
133 | 118 |
Identifier metadataPid = new Identifier(); |
134 | 119 |
metadataPid.setValue("testAnnotation.eml." + System.currentTimeMillis()); |
135 | 120 |
Session session = getTestSession(); |
... | ... | |
148 | 133 |
|
149 | 134 |
// generate the annotation for the metadata |
150 | 135 |
DatapackageSummarizer ds = new DatapackageSummarizer(); |
151 |
ds.randomize = randomize; |
|
152 | 136 |
String rdfContent = ds.generateAnnotation(metadataPid); |
153 | 137 |
|
154 | 138 |
// save the annotation |
Also available in: Unified diff
simplify lookup for classes and orcid. remove the "random" annotation code branches -- just too confusing to look at those bogus classes especially now that we have "real" generated annotations.