Package hu.sztaki.ilab.longneck

Examples of hu.sztaki.ilab.longneck.TestCase


        blocks.add(snBlock);
        process.setBlocks(blocks);

        // Set test cases

        TestCase testCase = new TestCase();
        RecordImplForTest sourceRecord = new RecordImplForTest();
        sourceRecord.setRole("source");
        sourceRecord.add(new Field("id", "42"));
        testCase.addRecord(sourceRecord);
        RecordImplForTest targetRecord = new RecordImplForTest();
        targetRecord.setRole("target");
        targetRecord.add(new Field("id", null));
        testCase.addRecord(targetRecord);

        List<TestCase> testCases = new ArrayList<TestCase>();
        testCases.add(testCase);
        process.setTestCases(testCases);

        CompactProcess cProcess = new CompactProcess(process, repository,
            frameAddressResolver, runtimeProperties);

        ProcessTester tester = new ProcessTester(cProcess, true);

        assertTrue(tester.testAll());

        // Add a test that fails

        TestCase testCase2 = new TestCase();
        RecordImplForTest sourceRecord2 = new RecordImplForTest();
        sourceRecord2.setRole("source");
        sourceRecord2.add(new Field("id", "42"));
        testCase2.addRecord(sourceRecord2);
        RecordImplForTest targetRecord2 = new RecordImplForTest();
        targetRecord2.setRole("target");
        targetRecord2.add(new Field("id", "42"));
        testCase2.addRecord(targetRecord2);

        testCases.add(testCase2);

        assertFalse(tester.testAll());
    }
View Full Code Here


        blocks.add(clBlock);
        process.setBlocks(blocks);

        // Set test cases

        TestCase testCase = new TestCase();
        RecordImplForTest sourceRecord = new RecordImplForTest();
        sourceRecord.setRole("source");
        sourceRecord.add(new Field("id", "42"));
        testCase.addRecord(sourceRecord);
        RecordImplForTest targetRecord = new RecordImplForTest();
        targetRecord.setRole("target");
        targetRecord.add(new Field("id", "42"));
        testCase.addRecord(targetRecord);
        RecordImplForTest targetRecord2 = new RecordImplForTest();
        targetRecord2.setRole("target");
        targetRecord2.add(new Field("id", "42"));
        testCase.addRecord(targetRecord2);

        List<TestCase> testCases = new ArrayList<TestCase>();
        testCases.add(testCase);
        process.setTestCases(testCases);

        CompactProcess cProcess = new CompactProcess(process, repository,
            frameAddressResolver, runtimeProperties);

        ProcessTester tester = new ProcessTester(cProcess, true);

        assertTrue(tester.testAll());

        // Add a test that fails

        TestCase testCase2 = new TestCase();
        testCase2.addRecord(sourceRecord);
        testCase2.addRecord(targetRecord);

        assertFalse(tester.testAll());
    }
View Full Code Here

        blocks.add(clBlock);
        process.setBlocks(blocks);

        // Set test cases

        TestCase testCase = new TestCase();
        RecordImplForTest sourceRecord = new RecordImplForTest();
        sourceRecord.setRole("source");
        sourceRecord.add(new Field("id", "42"));
        testCase.addRecord(sourceRecord);
        RecordImplForTest targetRecord = new RecordImplForTest();
        targetRecord.setRole("target");
        targetRecord.add(new Field("id", "42"));
        testCase.addRecord(targetRecord);
        RecordImplForTest targetRecord2 = new RecordImplForTest();
        targetRecord2.setRole("target");
        targetRecord2.add(new Field("id", "41"));
        testCase.addRecord(targetRecord2);

        List<TestCase> testCases = new ArrayList<TestCase>();
        testCases.add(testCase);
        process.setTestCases(testCases);
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.TestCase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.