Package com.rescripter

Source Code of com.rescripter.RescripterIntegrationTest

package com.rescripter;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;

import java.io.IOException;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.JavaModelException;
import org.junit.Test;

import com.rescripter.script.RunScript;

public class RescripterIntegrationTest extends BaseRescripterIntegrationTest {

  @Test public void
  populates_java_project() throws JavaModelException {
    assertThat(getJavaProject().findType("com.example.Person"), is(notNullValue()));
  }
 
  @Test public void
  runs_basic_script() throws IOException, CoreException {
    RunScript runScript = new RunScript(getWindow());
    runScript.withContents("var response = 42;\n", null, "inline script");
    assertThat(runScript.getIntegerProperty("response"), is(42));
  }
 
}
TOP

Related Classes of com.rescripter.RescripterIntegrationTest

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.