Package com.eclipsesource.jshint.internal

Source Code of com.eclipsesource.jshint.internal.ProblemImpl_Test

/*******************************************************************************
* Copyright (c) 2013 EclipseSource.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*    Ralf Sternberg - initial implementation and API
******************************************************************************/
package com.eclipsesource.jshint.internal;

import org.junit.Test;

import com.eclipsesource.jshint.Problem;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;


public class ProblemImpl_Test {

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

    assertFalse( problem.isError() );
  }

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

    assertFalse( problem.isError() );
  }

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

    assertFalse( problem.isError() );
  }

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

    assertTrue( problem.isError() );
  }

}
TOP

Related Classes of com.eclipsesource.jshint.internal.ProblemImpl_Test

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.