Search in sources :

Example 1 with PlainFileContentProvider

use of de.be4.classicalb.core.parser.PlainFileContentProvider in project probparsers by bendisposto.

the class DefinitionFilesTest method testNotExistingFile.

@Test
public void testNotExistingFile() {
    final String testMachine = "MACHINE Test\nDEFINITIONS \"DefFile\"; def1 == xx\nEND";
    try {
        new BParser("testcase").parse(testMachine, false, new PlainFileContentProvider());
        fail("Expected exception was not thrown");
    } catch (final BCompoundException e) {
    // EXPECTED
    }
}
Also used : BParser(de.be4.classicalb.core.parser.BParser) BCompoundException(de.be4.classicalb.core.parser.exceptions.BCompoundException) PlainFileContentProvider(de.be4.classicalb.core.parser.PlainFileContentProvider) Test(org.junit.Test)

Aggregations

BParser (de.be4.classicalb.core.parser.BParser)1 PlainFileContentProvider (de.be4.classicalb.core.parser.PlainFileContentProvider)1 BCompoundException (de.be4.classicalb.core.parser.exceptions.BCompoundException)1 Test (org.junit.Test)1