<commit_before>package com.rackspace.cloud.api.docs;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.xml.sax.InputSource;

import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXSource;

import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

/**
 * User: sbrayman
 * Date: 12/14/11
 */

@RunWith(Enclosed.class)
public class CalabashHelperTest {
    public static class whenUsingCalabashHelper {

        String pipelineURI = null;
        SAXSource source = null;
        InputSource inputSource = null;

        @Before
        public void setUp() throws Exception {
            pipelineURI = "/Users/sbrayman/Documents/workspace/rc-maven-cloud-docs/src/main/resources/test.xpl";
            source = new SAXSource(mock(InputSource.class));
        }

        @Ignore  //ugh
        @Test
        public void shouldReturnSource() throws Exception {
            assertTrue("This should return an object of type Source", CalabashHelper.createSource(source) instanceof Source);
        }
    }
}<commit_msg>Adding real test.<commit_after>package com.rackspace.cloud.api.docs;

import org.apache.maven.plugin.MojoExecutionException;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.xml.sax.InputSource;

import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXSource;

import static org.mockito.Mockito.mock;

/**
 * User: sbrayman
 * Date: 12/14/11
 */

@RunWith(Enclosed.class)
public class CalabashHelperTest {
    public static class whenUsingCalabashHelper {

        String pipelineURI = null;
        InputSource inputSource = null;
        Source source = null;

        @Before
        public void setUp() throws Exception {
            pipelineURI = "/Users/sbrayman/Documents/workspace/rc-maven-cloud-docs/src/main/resources/test.xpl";
            inputSource = mock(InputSource.class);
            source = mock(Source.class);
        }

        @Test (expected=MojoExecutionException.class)
        public void shouldThrowSAXSourceError() throws Exception {
            CalabashHelper.createSource(source);
        }
    }
}
{'fraction_non_alphanumeric': 0.10173913043478261, 'fraction_numerical': 0.0052173913043478265, 'mean_word_length': 3.1236559139784945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '3228200', 'n_tokens_mistral': 693, 'n_tokens_neox': 675, 'n_words': 139}