<commit_before>package hudson.plugins.emailext.plugins.trigger;

import hudson.model.Result;
import hudson.plugins.emailext.plugins.EmailTrigger;

import java.io.IOException;

import org.junit.Test;

/**
 * Unit tests for the Calypso-specific "Status changed" trigger.
 *
 * @author francois_ritaly
 */
public class StatusChangedTriggerTest extends TriggerTestBase {

	@Override
	EmailTrigger newInstance() {
		return new StatusChangedTrigger(true, true, true, false, "", "", "", "", "", 0, "project");
	}

	// --- Transitions from <no-status> to <status> --- //

	@Test
	public void testTrigger_Success() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.SUCCESS);
	}

	@Test
	public void testTrigger_Aborted() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.ABORTED);
	}

	@Test
	public void testTrigger_Failure() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.FAILURE);<commit_msg>Removed references to Calypso in javadoc<commit_after>package hudson.plugins.emailext.plugins.trigger;

import hudson.model.Result;
import hudson.plugins.emailext.plugins.EmailTrigger;

import java.io.IOException;

import org.junit.Test;

/**
 * Unit tests for the "Status changed" trigger.
 *
 * @author francois_ritaly
 */
public class StatusChangedTriggerTest extends TriggerTestBase {

	@Override
	EmailTrigger newInstance() {
		return new StatusChangedTrigger(true, true, true, false, "", "", "", "", "", 0, "project");
	}

	// --- Transitions from <no-status> to <status> --- //

	@Test
	public void testTrigger_Success() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.SUCCESS);
	}

	@Test
	public void testTrigger_Aborted() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.ABORTED);
	}

	@Test
	public void testTrigger_Failure() throws IOException, InterruptedException {
		// Notification expected since this is the first build status defined
		assertTriggered(Result.FAILURE);
{'fraction_non_alphanumeric': 0.09922680412371133, 'fraction_numerical': 0.000859106529209622, 'mean_word_length': 4.8813131313131315, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '143646', 'n_tokens_mistral': 663, 'n_tokens_neox': 630, 'n_words': 193}