Package me.senior_sigan.code_formatter.streams

Examples of me.senior_sigan.code_formatter.streams.StringOutStream


     * @throws FormatterException
     */
    @Test(expected = StreamException.class)
    public void testFileInStream() throws StreamException, FormatterException {
        FileInStream inStream = new FileInStream("somewhere");
        StringOutStream outStream = new StringOutStream();
        formatter.format(inStream, outStream, options);
    }
View Full Code Here


     */
    @Test(expected = NotEnoughBracketsException.class)
    public void testBrackets() throws FormatterException{
        String badCode = "public class Class { void main(){}";
        try {
            formatter.format(new StringInStream(badCode), new StringOutStream(), options);
        } catch (StreamException e){
            // do nothing
        }
    }
View Full Code Here

                "public void someMethod(int a) {" +
                        "\n  for(int i=0;i<a;i++) {" +
                        "\n    bum(i)" +
                        "\n  }" +
                        "\n}";
        StringOutStream res = new StringOutStream();
        try {
            formatter.format(new StringInStream(code), res, options);
        } catch (FormatterException e){
        }catch (StreamException e){}
        assertEquals(resCode, res.show());
    }
View Full Code Here

                "public void someMethod(int a) {" +
                        "\n\tfor(int i=0;i<a;i++) {" +
                        "\n\t\tbum(i)" +
                        "\n\t}" +
                        "\n}";
        StringOutStream res = new StringOutStream();
        try {
            formatter.format(new StringInStream(code), res, options);
        } catch (FormatterException e){}
        catch(StreamException e){}
        assertEquals(resCode, res.show());
    }
View Full Code Here

TOP

Related Classes of me.senior_sigan.code_formatter.streams.StringOutStream

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.