Package org.constretto.test

Source Code of org.constretto.test.ConstrettoRuleClassRuleTest

package org.constretto.test;

import org.constretto.ConstrettoBuilder;
import org.constretto.ConstrettoConfiguration;
import org.constretto.annotation.Tags;
import org.junit.ClassRule;
import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertArrayEquals;

/**
* This source code is the property of NextGenTel AS
*
* @author sek
*/
@Tags({"purejunit", "test"})
public class ConstrettoRuleClassRuleTest {

    @Tags
    List<String> currentEnvironment;

    @ClassRule
    public static ConstrettoRule constrettoRule = new ConstrettoRule();

    @Test
    public void testAsClassRule() throws Exception {
        String[] expected = {"purejunit", "test"};

        ConstrettoConfiguration configuration =
                new ConstrettoBuilder().createSystemPropertiesStore().getConfiguration();
        configuration.on(this);

        assertArrayEquals(expected, currentEnvironment.toArray(new String[0]));


    }
}
TOP

Related Classes of org.constretto.test.ConstrettoRuleClassRuleTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.