aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
diff options
context:
space:
mode:
authorJon Bratseth <jonbratseth@yahoo.com>2017-01-12 22:17:49 +0100
committerGitHub <noreply@github.com>2017-01-12 22:17:49 +0100
commit585a5b38c5811da950336c26326636773ca289e3 (patch)
treebacb7cb5b8d3e881a2df260589b9b0e046b12e89 /config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
parentb72c29c29a2c8dd8ecac8aeffdaff688b21ee41c (diff)
Revert "Revert "Bratseth/tensor type info in documents""
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java')
-rwxr-xr-xconfig-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
index c33ebc95bd2..3236be983d8 100755
--- a/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
@@ -10,26 +10,28 @@ import java.io.IOException;
import static org.junit.Assert.fail;
/**
- * tests importing of document containing array type fields
+ * Tests importing of document containing array type fields
*
* @author bratseth
*/
public class StructTestCase extends SearchDefinitionTestCase {
+
@Test
public void testStruct() throws IOException, ParseException {
assertConfigFile("src/test/examples/structresult.cfg",
- new DocumentmanagerConfig(Deriver.getDocumentManagerConfig("src/test/examples/struct.sd")).toString() + "\n");
+ new DocumentmanagerConfig(Deriver.getDocumentManagerConfig("src/test/examples/struct.sd")).toString() + "\n");
}
+
@Test
public void testBadStruct() throws IOException {
try {
SearchBuilder.buildFromFile("src/test/examples/badstruct.sd");
fail("Should throw exception.");
- } catch (ParseException e) {
- //ok!
- //e.printStackTrace();
+ } catch (ParseException expected) {
+ // success
}
}
+
@Test
public void testStructAndDocumentWithSameNames() throws IOException, ParseException {
try {
@@ -41,8 +43,6 @@ public class StructTestCase extends SearchDefinitionTestCase {
/**
* Declaring a struct before a document will fail, no doc type to add it to.
- * @throws IOException
- * @throws ParseException
*/
@Test(expected = IllegalArgumentException.class)
public void testStructOutsideDocumentIllegal() throws IOException, ParseException {