blob: 6d722138871d397e11cc614b8f2c3fa77a7b4b1b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.derived.AbstractExportingTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* @author Simon Thoresen Hult
*/
public class ReservedDocumentNamesTestCase extends AbstractExportingTestCase {
@Test
public void requireThatPositionIsAReservedDocumentName() throws IOException, ParseException {
try {
assertCorrectDeriving("reserved_position");
fail();
} catch (IllegalArgumentException e) {
assertEquals("For schema 'position': Document name 'position' is reserved.", e.getMessage());
}
}
}
|