<commit_before>## Overview

Mockatoo is a Haxe mocking library that uses macros to generated mock
implementations of classes and interfaces for testing. Tested against Haxe 2.10 across most platforms (AVM2, JavaScript, Neko, C++, etc)

Mockatoo is inspired by **Mockito**'s public API <http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html>



> Disambiguation: The **Mockatoo** belongs to the bird family *Cacatuidae* and look suspiciously like a taxidermied [Cockatoo](http://en.wikipedia.org/wiki/Cockatoo) but with fake plumage. They are mostly found nesting within testing habitats and may turn violent if mistaken for a *MockingBird* :)


#### Mockatoo is in very early developement and is subject to change.

* See [releases](#releases) for details on the current stable release.
* See [roadmap](#roadmap) for more details on planned features.


## Installation

Install the latest directly from github:

	haxelib git mockatoo https://github.com/misprintt/mockatoo.git src

Or point to your local fork:

	haxelib dev mockatoo /ABSOLUTE_PATH_TO_REPO/src/lib

## Usage

Import Mockatoo;

	import mockatoo.Mockatoo;

### Creating a mock instance

Mocks can be generated from any Class, Interface or Typedef alias (not typedef structure)

	var mockedClass = Mockatoo.mock(SomeClass);
	var mockedInterface = Mockatoo.mock(SomeInterface);

A Mock class type will be generated that extends the Class (or Interface), stubbing all methods, and generate the code to instanciate the instance:

	var mockedClass = new SomeClassMocked();
	var mockedInterface = new SomeInterfaceMocked();


If a class requires Type paramaters then you can either use a typedef alias.

	typedef FooBar = Foo<Bar>;

	...
<commit_msg>updated git url in installation instructions<commit_after>## Overview

Mockatoo is a Haxe mocking library that uses macros to generated mock
implementations of classes and interfaces for testing. Tested against Haxe 2.10 across most platforms (AVM2, JavaScript, Neko, C++, etc)

Mockatoo is inspired by **Mockito**'s public API <http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html>



> Disambiguation: The **Mockatoo** belongs to the bird family *Cacatuidae* and look suspiciously like a taxidermied [Cockatoo](http://en.wikipedia.org/wiki/Cockatoo) with fake plumage. They are mostly found nesting within testing habitats and may turn violent if mistaken for a *MockingBird* :)


#### Mockatoo is in very early developement and is subject to change.

* See [releases](#releases) for details on the current stable release.
* See [roadmap](#roadmap) for more details on planned features.


## Installation

Install the latest directly from github:

	haxelib git mockatoo https://github.com/misprintt/mockatoo.git src/lib/src

Or point to your local fork:

	haxelib dev mockatoo /ABSOLUTE_PATH_TO_REPO/src

## Usage

Import Mockatoo;

	import mockatoo.Mockatoo;

### Creating a mock instance

Mocks can be generated from any Class, Interface or Typedef alias (not typedef structure)

	var mockedClass = Mockatoo.mock(SomeClass);
	var mockedInterface = Mockatoo.mock(SomeInterface);

A Mock class type will be generated that extends the Class (or Interface), stubbing all methods, and generate the code to instanciate the instance:

	var mockedClass = new SomeClassMocked();
	var mockedInterface = new SomeInterfaceMocked();


If a class requires Type paramaters then you can either use a typedef alias.

	typedef FooBar = Foo<Bar>;

	...

{'fraction_non_alphanumeric': 0.07674619143432021, 'fraction_numerical': 0.0022995113538373095, 'mean_word_length': 4.858585858585859, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '3241372', 'n_tokens_mistral': 1071, 'n_tokens_neox': 986, 'n_words': 416}