<commit_before>package org.openscore.lang.compiler.modeller.transformers;

import junit.framework.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.openscore.lang.entities.LoopStatement;

public class ForTransformerTest {

    @Rule
    public ExpectedException exception = ExpectedException.none();

    private ForTransformer transformer = new ForTransformer();

    @Test
    public void testValidStatement() throws Exception {
        LoopStatement statement = transformer.transform("x in collection");
        Assert.assertEquals("x", statement.getVarName());
        Assert.assertEquals("collection", statement.getCollectionExpression());
    }

    @Test
    public void testValidStatementAndTrim() throws Exception {
        LoopStatement statement = transformer.transform(" min   in  collection  ");
        Assert.assertEquals("min", statement.getVarName());
        Assert.assertEquals("collection", statement.getCollectionExpression());<commit_msg>added test expression with spaces<commit_after>package org.openscore.lang.compiler.modeller.transformers;

import junit.framework.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.openscore.lang.entities.LoopStatement;

public class ForTransformerTest {

    @Rule
    public ExpectedException exception = ExpectedException.none();

    private ForTransformer transformer = new ForTransformer();

    @Test
    public void testValidStatement() throws Exception {
        LoopStatement statement = transformer.transform("x in collection");
        Assert.assertEquals("x", statement.getVarName());
        Assert.assertEquals("collection", statement.getCollectionExpression());
    }

    @Test
    public void testValidStatementWithSpaces() throws Exception {
        LoopStatement statement = transformer.transform("x in range(0, 9)");
        Assert.assertEquals("x", statement.getVarName());
        Assert.assertEquals("range(0, 9)", statement.getCollectionExpression());
    }

    @Test
    public void testValidStatementAndTrim() throws Exception {
        LoopStatement statement = transformer.transform(" min   in  collection  ");
        Assert.assertEquals("min", statement.getVarName());
        Assert.assertEquals("collection", statement.getCollectionExpression());
{'fraction_non_alphanumeric': 0.10199745006374841, 'fraction_numerical': 0.0016999575010624734, 'mean_word_length': 4.436489607390301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6546887', 'n_tokens_mistral': 575, 'n_tokens_neox': 552, 'n_words': 132}