import static org.junit.Assert.fail;
import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URISyntaxException;
-import java.text.ParseException;
import java.util.Date;
import org.junit.Test;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
import org.opendaylight.yangtools.yang.parser.spi.meta.InvalidSubstatementException;
public class DeviationResolutionTest {
@Test
- public void testDeviateNotSupported() throws ReactorException, FileNotFoundException, URISyntaxException,
- ParseException {
+ public void testDeviateNotSupported() throws Exception {
final SchemaContext schemaContext = StmtTestUtils.parseYangSources(
"/deviation-resolution-test/deviation-not-supported");
assertNotNull(schemaContext);
}
@Test
- public void testDeviateAdd() throws ReactorException, FileNotFoundException, URISyntaxException, ParseException {
+ public void testDeviateAdd() throws Exception {
final SchemaContext schemaContext = StmtTestUtils.parseYangSource(
"/deviation-resolution-test/deviation-add/foo.yang");
assertNotNull(schemaContext);
}
@Test
- public void testDeviateReplace() throws ReactorException, FileNotFoundException, URISyntaxException, ParseException {
+ public void testDeviateReplace() throws Exception {
final SchemaContext schemaContext = StmtTestUtils.parseYangSource(
"/deviation-resolution-test/deviation-replace/foo.yang");
assertNotNull(schemaContext);
}
@Test
- public void testDeviateDelete() throws ReactorException, FileNotFoundException, URISyntaxException, ParseException {
+ public void testDeviateDelete() throws Exception {
final SchemaContext schemaContext = StmtTestUtils.parseYangSource(
"/deviation-resolution-test/deviation-delete/foo.yang");
assertNotNull(schemaContext);
}
@Test
- public void shouldFailOnInvalidYang10Model() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidYang10Model() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-add/foo10-invalid.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidYang10Model2() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidYang10Model2() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-delete/foo10-invalid.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviationTarget() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviationTarget() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/foo-invalid-deviation-target.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviationPath() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviationPath() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/foo-invalid-deviation-path.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateAdd() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateAdd() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-add/foo-invalid.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateAdd2() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateAdd2() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-add/foo-invalid-2.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateAdd3() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateAdd3() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-add/foo-invalid-4.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateReplace() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateReplace() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-replace/foo-invalid.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldLogInvalidDeviateReplaceAttempt() throws FileNotFoundException, URISyntaxException,
- UnsupportedEncodingException, ReactorException {
+ public void shouldLogInvalidDeviateReplaceAttempt() throws Exception {
final PrintStream stdout = System.out;
final ByteArrayOutputStream output = new ByteArrayOutputStream();
final String testLog;
}
@Test
- public void shouldLogInvalidDeviateDeleteAttempt() throws FileNotFoundException, URISyntaxException,
- UnsupportedEncodingException, ReactorException {
+ public void shouldLogInvalidDeviateDeleteAttempt() throws Exception {
final PrintStream stdout = System.out;
final ByteArrayOutputStream output = new ByteArrayOutputStream();
final String testLog;
}
@Test
- public void shouldFailOnInvalidDeviateAddSubstatement() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateAddSubstatement() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-add/foo-invalid-3.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateReplaceSubstatement() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateReplaceSubstatement() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-replace/foo-invalid-3.yang");
fail("An exception should have been thrown.");
}
@Test
- public void shouldFailOnInvalidDeviateDeleteSubstatement() throws FileNotFoundException, URISyntaxException {
+ public void shouldFailOnInvalidDeviateDeleteSubstatement() throws Exception {
try {
StmtTestUtils.parseYangSource("/deviation-resolution-test/deviation-delete/foo-invalid-2.yang");
fail("An exception should have been thrown.");