<commit_before>######################################################################
# AUnit README
######################################################################

# aunit

A packaging and unit test framework for Apama. 

Enables developers to write apama unit tests in native EPL, performing asserts on any part of their epl application. Aunit also ships with a basic apama package management solution to handle project-level dependency injection.

It is a command line tool, designed to work on both windows and linux, the CLI samples in this document are in bash.

Currently aunit tests support:

    * Synchronous test actions
    * Asynchronous test actions
    * Setup/Teardown actions
    * Initialise action 
    * External Project Referencing
    * External File Referencing
  
License: aunit is distributed under the terms of the MIT license, free and open source.

For comments and suggestions please email antoine AT reltech.com

# Installation

To install, download and unzip the latest version from github. Export the `$AUNIT_HOME` environment variable. From an *apama command prompt* type the following:

```
wget https://github.com/antoinewaugh/aunit/archive/master.zip
unzip aunit-master.zip

export AUNIT_HOME=/path/to/aunit-master
```

To test the success of the installation, run the aunit build and aunit test commands from an apama command prompt:

```
cd $AUNIT_HOME/bin
aunit build
aunit test HelloWorld
```
    //@Initialise
    action init(action<> cbInit) {
        cbInit();
    }

    //@Setup
    action setup(action<> cbSetup) {
        cbSetup();
    }

    //@Teardown
    action teardown(action<> cbTeardown) {
        cbTeardown();
    }
The test result should be written to the screen.

```
2016-09-09 09:06:46,552 INFO  ==============================================================
2016-09-09 09:06:46,552 INFO  Id   : HelloWorldTest
2016-09-09 09:06:46,552 INFO  ==============================================================
2016-09-09 09:06:48,927 INFO
2016-09-09 09:06:48,927 INFO  cleanup:
2016-09-09 09:06:48,979 INFO  Executed shutdown <correlator>, exit status 0
2016-09-09 09:06:49,079 INFO
2016-09-09 09:06:49,081 INFO  Test duration: 1.82 secs
2016-09-09 09:06:49,082 INFO  Test final outcome:  PASSED
2016-09-09 09:06:49,082 INFO
2016-09-09 09:06:49,085 CRIT
2016-09-09 09:06:49,085 CRIT  Test duration: 1.84 (secs)
2016-09-09 09:06:49,086 CRIT
2016-09-09 09:06:49,086 CRIT  Summary of non passes:
2016-09-09 09:06:49,088 CRIT    THERE WERE NO NON PASSES
```

**NB:** Due to a bug with the version of ant which ships with apama, please ignore any *[xslt]: Warning* messages referring to the JAXSAXParser. It does not affect the result of the build.<commit_msg>Removed accidental paste to readme<commit_after>######################################################################
# AUnit README
######################################################################

# aunit

A packaging and unit test framework for Apama. 

Enables developers to write apama unit tests in native EPL, performing asserts on any part of their epl application. Aunit also ships with a basic apama package management solution to handle project-level dependency injection.

It is a command line tool, designed to work on both windows and linux, the CLI samples in this document are in bash.

Currently aunit tests support:

    * Synchronous test actions
    * Asynchronous test actions
    * Setup/Teardown actions
    * Initialise action 
    * External Project Referencing
    * External File Referencing
  
License: aunit is distributed under the terms of the MIT license, free and open source.

For comments and suggestions please email antoine AT reltech.com

# Installation

To install, download and unzip the latest version from github. Export the `$AUNIT_HOME` environment variable. From an *apama command prompt* type the following:

```
wget https://github.com/antoinewaugh/aunit/archive/master.zip
unzip aunit-master.zip

export AUNIT_HOME=/path/to/aunit-master
```

To test the success of the installation, run the aunit build and aunit test commands from an apama command prompt:

```
cd $AUNIT_HOME/bin
aunit build
aunit test HelloWorld
```
The test result should be written to the screen.

```
2016-09-09 09:06:46,552 INFO  ==============================================================
2016-09-09 09:06:46,552 INFO  Id   : HelloWorldTest
2016-09-09 09:06:46,552 INFO  ==============================================================
2016-09-09 09:06:48,927 INFO
2016-09-09 09:06:48,927 INFO  cleanup:
2016-09-09 09:06:48,979 INFO  Executed shutdown <correlator>, exit status 0
2016-09-09 09:06:49,079 INFO
2016-09-09 09:06:49,081 INFO  Test duration: 1.82 secs
2016-09-09 09:06:49,082 INFO  Test final outcome:  PASSED
2016-09-09 09:06:49,082 INFO
2016-09-09 09:06:49,085 CRIT
2016-09-09 09:06:49,085 CRIT  Test duration: 1.84 (secs)
2016-09-09 09:06:49,086 CRIT
2016-09-09 09:06:49,086 CRIT  Summary of non passes:
2016-09-09 09:06:49,088 CRIT    THERE WERE NO NON PASSES
```

**NB:** Due to a bug with the version of ant which ships with apama, please ignore any *[xslt]: Warning* messages referring to the JAXSAXParser. It does not affect the result of the build.
{'fraction_non_alphanumeric': 0.17516289766193943, 'fraction_numerical': 0.1004216174779609, 'mean_word_length': 4.540339702760085, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4274230', 'n_tokens_mistral': 1918, 'n_tokens_neox': 1498, 'n_words': 592}