Package com.eclipsesource.jshint

Examples of com.eclipsesource.jshint.Problem


    verify( adapter ).createWarning( 1, -1, -1, "test" );
  }

  private Problem mockError( int line, int character, String message ) {
    Problem problem = mockWarning( line, character, message );
    when( Boolean.valueOf( problem.isError() ) ).thenReturn( Boolean.TRUE );
    return problem;
  }
View Full Code Here


    when( Boolean.valueOf( problem.isError() ) ).thenReturn( Boolean.TRUE );
    return problem;
  }

  private Problem mockWarning( int line, int character, String message ) {
    Problem problem = mock( Problem.class );
    when( Integer.valueOf( problem.getLine() ) ).thenReturn( Integer.valueOf( line ) );
    when( Integer.valueOf( problem.getCharacter() ) ).thenReturn( Integer.valueOf( character ) );
    when( problem.getMessage() ).thenReturn( message );
    return problem;
  }
View Full Code Here

public class ProblemImpl_Test {

  @Test
  public void isError_falseForNull() {
    Problem problem = new ProblemImpl( 0, 0, null, null );

    assertFalse( problem.isError() );
  }
View Full Code Here

    assertFalse( problem.isError() );
  }

  @Test
  public void isError_falseForEmptyString() {
    Problem problem = new ProblemImpl( 0, 0, null, "" );

    assertFalse( problem.isError() );
  }
View Full Code Here

    assertFalse( problem.isError() );
  }

  @Test
  public void isError_falseForAnythingElse() {
    Problem problem = new ProblemImpl( 0, 0, null, "foo" );

    assertFalse( problem.isError() );
  }
View Full Code Here

    assertFalse( problem.isError() );
  }

  @Test
  public void isError_trueForErrors() {
    Problem problem = new ProblemImpl( 0, 0, null, "E000" );

    assertTrue( problem.isError() );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.jshint.Problem

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.