summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b19410d)
Change-Id: I2c281b8feb10fe25f67ec81de49bd0fbc69c7f45
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
.add(Rfc6020Mapping.MUST, 0, MAX)
.add(Rfc6020Mapping.MIN_ELEMENTS, 0, 1)
.add(Rfc6020Mapping.MAX_ELEMENTS, 0, 1)
.add(Rfc6020Mapping.MUST, 0, MAX)
.add(Rfc6020Mapping.MIN_ELEMENTS, 0, 1)
.add(Rfc6020Mapping.MAX_ELEMENTS, 0, 1)
- .build(SubstatementValidator.SpecialCase.NOTNULL);
protected RefineStatementImpl(final StmtContext<SchemaNodeIdentifier, RefineStatement, ?> context) {
super(context);
protected RefineStatementImpl(final StmtContext<SchemaNodeIdentifier, RefineStatement, ?> context) {
super(context);
package org.opendaylight.yangtools.yang.stmt.test;
package org.opendaylight.yangtools.yang.stmt.test;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
-import java.util.NoSuchElementException;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
@Test
public void noException() throws URISyntaxException, ReactorException {
@Test
public void noException() throws URISyntaxException, ReactorException {
- Set<Module> modules = TestUtils.loadModules(getClass().getResource("/augment-test/augment-in-augment").toURI());
+ final Set<Module> modules = TestUtils.loadModules(getClass().getResource("/augment-test/augment-in-augment")
+ .toURI());
assertNotNull(modules);
}
@Test
public void undesirableElementException() throws URISyntaxException, ReactorException {
assertNotNull(modules);
}
@Test
public void undesirableElementException() throws URISyntaxException, ReactorException {
- Set<Module> modules = TestUtils.loadModules(getClass().getResource
- ("/substatement-validator/undesirable-element").toURI());
+ final Set<Module> modules = TestUtils.loadModules(getClass().getResource(
+ "/substatement-validator/undesirable-element").toURI());
testLog = output.toString();
assertTrue(testLog.contains("TYPE is not valid for REVISION"));
}
@Test
public void maximalElementCountException() throws URISyntaxException, ReactorException {
testLog = output.toString();
assertTrue(testLog.contains("TYPE is not valid for REVISION"));
}
@Test
public void maximalElementCountException() throws URISyntaxException, ReactorException {
- Set<Module> modules = TestUtils.loadModules(getClass().getResource
- ("/substatement-validator/maximal-element").toURI());
+ final Set<Module> modules = TestUtils.loadModules(getClass().getResource(
+ "/substatement-validator/maximal-element").toURI());
testLog = output.toString();
assertTrue(testLog.contains("Maximal count of DESCRIPTION for AUGMENT is 1"));
}
testLog = output.toString();
assertTrue(testLog.contains("Maximal count of DESCRIPTION for AUGMENT is 1"));
}
public void missingElementException() throws URISyntaxException, ReactorException {
expectedEx.expect(MissingSubstatementException.class);
public void missingElementException() throws URISyntaxException, ReactorException {
expectedEx.expect(MissingSubstatementException.class);
- Set<Module> modules = TestUtils.loadModules(getClass().getResource
- ("/substatement-validator/missing-element").toURI());
+ final Set<Module> modules = TestUtils.loadModules(getClass().getResource(
+ "/substatement-validator/missing-element").toURI());
- public void emptyElementException() throws URISyntaxException, ReactorException {
- expectedEx.expect(NoSuchElementException.class);
-
- Set<Module> modules = TestUtils.loadModules(getClass().getResource
- ("/substatement-validator/empty-element").toURI());
+ public void bug6173Test() throws ReactorException, URISyntaxException {
+ final Set<Module> loadModules = TestUtils.loadModules(getClass().getResource(
+ "/substatement-validator/empty-element").toURI());
+ assertEquals(1, loadModules.size());
}
@Test
public void bug4310test() throws URISyntaxException, ReactorException {
expectedEx.expect(IllegalArgumentException.class);
}
@Test
public void bug4310test() throws URISyntaxException, ReactorException {
expectedEx.expect(IllegalArgumentException.class);
- Set<Module> modules = TestUtils.loadModules(getClass().getResource
- ("/substatement-validator/bug-4310").toURI());
+ final Set<Module> modules = TestUtils.loadModules(getClass().getResource("/substatement-validator/bug-4310")
+ .toURI());
}
}
\ No newline at end of file
}
}
\ No newline at end of file
-}
\ No newline at end of file