<commit_before>package org.camunda.bpm.extension.process_test_coverage.bpmn;

import java.util.HashMap;
import java.util.Map;

import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRule;
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
import org.hamcrest.Matchers;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;

public class BpmnBusinessRuleTaskCoverageTest {
    /**
     * XXXX &lt;camunda&gt; namespace support works from Camunda BPM versions
     * 7.4.0, 7.3.3, 7.2.6 onwards.
     */

    private static final String PROCESS_DEFINITION_KEY = "process-business-rule-task";

    @ClassRule
    public static TestCoverageProcessEngineRule classRule = TestCoverageProcessEngineRuleBuilder.createClassRule() //
    .reportCoverageAfter().assertCoverage(Matchers.equalTo(1.0)).build();

    @Rule // Method rule does the deployment ATM
    public TestCoverageProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();

    @Test
    @Deployment(resources = "businessRuleTask.bpmn")
    public void testGo() {
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("decision", "go");
        rule.getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY, variables);
    }

    @Test
    @Deployment(resources = "businessRuleTask.bpmn")
    public void testStay() {
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("decision", "stay");
        rule.getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY, variables);
    }

}<commit_msg>fix: use classRule instead of method rule for starting process<commit_after>package org.camunda.bpm.extension.process_test_coverage.bpmn;

import java.util.HashMap;
import java.util.Map;

import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRule;
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
import org.hamcrest.Matchers;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;

public class BpmnBusinessRuleTaskCoverageTest {
    /**
     * XXXX &lt;camunda&gt; namespace support works from Camunda BPM versions
     * 7.4.0, 7.3.3, 7.2.6 onwards.
     */

    private static final String PROCESS_DEFINITION_KEY = "process-business-rule-task";

    @ClassRule
    public static TestCoverageProcessEngineRule classRule = TestCoverageProcessEngineRuleBuilder.createClassRule() //
    .reportCoverageAfter().assertCoverage(Matchers.equalTo(1.0)).build();

    @Rule // Method rule does the deployment ATM
    public TestCoverageProcessEngineRule deployRule = TestCoverageProcessEngineRuleBuilder.create().build();

    @Test
    @Deployment(resources = "businessRuleTask.bpmn")
    public void testGo() {
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("decision", "go");
        classRule.getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY, variables);
    }

    @Test
    @Deployment(resources = "businessRuleTask.bpmn")
    public void testStay() {
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("decision", "stay");
        classRule.getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY, variables);
    }

}
{'fraction_non_alphanumeric': 0.10664780763790664, 'fraction_numerical': 0.006223479490806223, 'mean_word_length': 4.612698412698412, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2684544', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1033, 'n_words': 193}