<commit_before>package main;

import static de.ptb.epics.eve.editor.tests.internal.Helper.*;

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

import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(SWTBotJunit4ClassRunner.class)
public class MyFirstTest {

	private static SWTWorkbenchBot bot;
	
@Test
public void thisPasses() throws Exception {
assertEquals(2, 2);
}

@Ignore("Always Fails")
@Test
public void thisFails() throws Exception {
assertTrue(false);
}

@Test
	public void canCreateANewJavaProject() throws Exception {
		
		// slow down tests
		SWTBotPreferences.PLAYBACK_DELAY = 1000;
	
		bot.menu("File").menu("New").click();
		
		SWTBotShell shell = bot.shell("New");
		shell.activate();
		bot.tree().select("Scan Description");
		bot.button("Next >").click();
		
		long time = System.currentTimeMillis();
		
		bot.textWithLabel("File name:").setText(
				"/tmp/eveTest" + time + ".scml");
		
		bot.button("Finish").click();
		
		SWTBotEditor editor = bot.activeEditor();
		
		assertEquals(editor.getTitle(), "eveTest" + time + ".scml");
		
		// set to the default speed
				SWTBotPreferences.PLAYBACK_DELAY = 0;
	}
	
	/* ******************************************************************** */
	
	@BeforeClass
	public static void beforeClass() throws Exception {
		bot = new SWTWorkbenchBot();
		bot.viewByTitle("Welcome").close();
	}
  
  /* ***************************************************** */

  @Before
  public void beforeEachTest() {
	  UIThreadRunnable.syncExec(new VoidResult() {
          public void run() {
              resetWorkbench();
          }
      });
  }
}<commit_msg>minor test modifications<commit_after>package main;

import static de.ptb.epics.eve.editor.tests.internal.Helper.*;

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

import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(SWTBotJunit4ClassRunner.class)
public class MyFirstTest {

	@Test
	public void thisPasses() throws Exception {
		assertEquals(2, 2);
	}

	@Test
	public void thisFails() throws Exception {
		assertTrue(false);
	}

  /* ***************************************************** */

  @Before
  public void beforeEachTest() {
	  UIThreadRunnable.syncExec(new VoidResult() {
          public void run() {
              resetWorkbench();
          }
      });
  }
}
{'fraction_non_alphanumeric': 0.17573221757322174, 'fraction_numerical': 0.0041841004184100415, 'mean_word_length': 4.386481802426343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1375804', 'n_tokens_mistral': 1044, 'n_tokens_neox': 953, 'n_words': 178}