<commit_before>package net.ttddyy.dsproxy.test.assertj;

import net.ttddyy.dsproxy.test.CallableBatchExecution;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;

/**
 * @author <NAME>
 * @since 1.4
 */
public class CallableBatchExecutionAssertTest {

    @Test
    public void testIsSuccess() {
        CallableBatchExecution cbe = new CallableBatchExecution();

        // success case
        cbe.setSuccess(true);
        CallableBatchExecutionAssert cbeAssert = new CallableBatchExecutionAssert(cbe);
        cbeAssert.isSuccess();

        // failure case
        cbe.setSuccess(false);
        cbeAssert = new CallableBatchExecutionAssert(cbe);
        try {
            cbeAssert.isSuccess();
            fail("assertion should fail");
        } catch (AssertionError e) {
            assertThat(e).hasMessage("\nExpecting: <Successful execution> but was: <Failure execution>\n");
        }

    }

    @Test
    public void testIsFailure() {
        CallableBatchExecution cbe = new CallableBatchExecution();

        // success case
        cbe.setSuccess(false);
        CallableBatchExecutionAssert cbeAssert = new CallableBatchExecutionAssert(cbe);
        cbeAssert.isFailure();

        // failure case
        cbe.setSuccess(true);
        cbeAssert = new CallableBatchExecutionAssert(cbe);
        try {
            cbeAssert.isFailure();
            fail("assertion should fail");
        } catch (AssertionError e) {
            assertThat(e).hasMessage("\nExpecting: <Failure execution> but was: <Successful execution>\n");
        }

    }
}
<commit_msg>polish<commit_after>package net.ttddyy.dsproxy.test.assertj;

import net.ttddyy.dsproxy.test.CallableBatchExecution;
import org.junit.Before;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;

/**
 * @author <NAME>
 * @since 1.4
 */
public class CallableBatchExecutionAssertTest {

    private CallableBatchExecution cbe;
    private CallableBatchExecutionAssert cbeAssert;

    @Before
    public void setUp() {
        this.cbe = new CallableBatchExecution();
        this.cbeAssert = new CallableBatchExecutionAssert(this.cbe);
    }

    @Test
    public void testIsSuccess() {
        // success case
        this.cbe.setSuccess(true);
        this.cbeAssert.isSuccess();

        // failure case
        this.cbe.setSuccess(false);
        try {
            this.cbeAssert.isSuccess();
            fail("assertion should fail");
        } catch (AssertionError e) {
            assertThat(e).hasMessage("\nExpecting: <Successful execution> but was: <Failure execution>\n");
        }

    }

    @Test
    public void testIsFailure() {
        // success case
        this.cbe.setSuccess(false);
        this.cbeAssert.isFailure();

        // failure case
        this.cbe.setSuccess(true);
        try {
            this.cbeAssert.isFailure();
            fail("assertion should fail");
        } catch (AssertionError e) {
            assertThat(e).hasMessage("\nExpecting: <Failure execution> but was: <Successful execution>\n");
        }

    }
}

{'fraction_non_alphanumeric': 0.1075031525851198, 'fraction_numerical': 0.0012610340479192938, 'mean_word_length': 2.541294642857143, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2376655', 'n_tokens_mistral': 914, 'n_tokens_neox': 899, 'n_words': 182}