Examples of IssueBuilder


Examples of com.googlecode.jslint4java.Issue.IssueBuilder

    }

    @Test
    public void testExpectedOutputOneIssue() {
        File file = new File("foo/bar.js");
        Issue issue = new IssueBuilder(file.toString(), 1, 1, "no clucking").evidence("cluck()")
                .build();
        issues.add(issue);
        runFormatter(file);
        // Build up the expected output in a cross-platform manner.
        String nl = System.getProperty("line.separator");
View Full Code Here

Examples of com.googlecode.jslint4java.Issue.IssueBuilder

     * When there's no evidence, we shouldn't print a blank line or a caret.
     */
    @Test
    public void testNoEvidence() throws Exception {
        File file = new File("foo/bar.js");
        Issue issue = new IssueBuilder(file.toString(), 1, 1, "fatality").build();
        issues.add(issue);
        runFormatter(file);
        // Build up the expected output in a cross-platform manner.
        String nl = System.getProperty("line.separator");
        StringBuilder sb = new StringBuilder(file.toString());
View Full Code Here

Examples of com.googlecode.jslint4java.Issue.IssueBuilder

        assertThat(issue.getCharacter(), is(0));
    }

    @Test
    public void testToString() {
        Issue issue = new IssueBuilder("foo.js", 1, 1, "you broke it").build();
        assertThat(issue.toString(), is("foo.js:1:1:you broke it"));
    }
View Full Code Here

Examples of com.googlecode.jslint4java.Issue.IssueBuilder

    /** We don't expect this to happen, but we shouldn't blow up either. @see issue 85 */
    @Test
    public void shouldCopeWithCharacterZero() throws Exception {
        String nl = System.getProperty("line.separator");
        String name = "foo/bar.js";
        Issue issue = new IssueBuilder(name, 0, 0, "oops").evidence("BANG").build();
        JSLintResult result = new JSLintResult.ResultBuilder(name).addIssue(issue).build();
        StringBuilder sb = new StringBuilder(name);
        sb.append(":0:0: oops").append(nl);
        sb.append("BANG").append(nl);
        sb.append("^").append(nl);
View Full Code Here

Examples of com.googlecode.jslint4java.Issue.IssueBuilder

    @Test
    public void testExpectedOutputOneIssue() {
        String nl = System.getProperty("line.separator");
        String name = "foo/bar.js";
        Issue issue = new IssueBuilder(name, 1, 2, "no clucking").evidence("cluck()").build();
        JSLintResult result = new JSLintResult.ResultBuilder(name).addIssue(issue).build();
        StringBuilder sb = new StringBuilder(name);
        sb.append(":1:2: no clucking").append(nl);
        sb.append("cluck()").append(nl);
        sb.append(" ^").append(nl);
View Full Code Here

Examples of com.googlecode.jslint4java.Issue.IssueBuilder

     */
    @Test
    public void testNoEvidence() throws Exception {
        String nl = System.getProperty("line.separator");
        String name = "foo/bar.js";
        Issue issue = new IssueBuilder(name, 1, 1, "fatality").build();
        JSLintResult result = new JSLintResult.ResultBuilder(name).addIssue(issue).build();
        StringBuilder sb = new StringBuilder(name);
        sb.append(":1:1: fatality");
        sb.append(nl);
        assertThat(rf.format(result), is(sb.toString()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.