Package testGenerator.utilities

Examples of testGenerator.utilities.SourceReader


        String result = control.generateJUnitTest(true);

        //FileSaver saver = new FileSaver(result, new File("./test/testGenerator/jUnitCreator/TestClassTst.txt"));

        //Read oracle file
        SourceReader reader = new SourceReader("./test/testGenerator/jUnitCreator/TestClassTst.txt");

        String expectedResult = reader.getSource();

        //Compare result
        assertEquals(expectedResult, result);

    }
View Full Code Here


        JUnitTestCreator instance = new JUnitTestCreator(control, methods, true);
        String reslt = instance.getTest();
        //FileSaver saver = new FileSaver(reslt, new File("./test/testGenerator/jUnitCreator/testOut.txt"));

        //Read oracle file
        SourceReader reader = new SourceReader("./test/testGenerator/jUnitCreator/testOut.txt");

        String expectedResult = reader.getSource();

        //Compare result
        assertEquals(expectedResult, reslt);

    }
View Full Code Here

     * Reads the source code file specified and returns its contents.
     * @return
     */
    public String getSourceCode()
    {
        SourceReader reader = new SourceReader(sourceLoc);
        return reader.getSource();
    }
View Full Code Here

TOP

Related Classes of testGenerator.utilities.SourceReader

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.