# MockBox

![MockBox](https://3869442881-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvpHGvcri7lG2ed%2F-LA-UeeLRqOWbuV1o1QC%2F-LA-UqJDefy_37dRD2ZH%2FMockBox_300.png?generation=1523647999121428\&alt=media)

## Introduction

TestBox includes a mocking and stubbing library we lovingly call MockBox.  You don't have to install it or have a separate libary, it is part of TestBox.

MockBox shines by allowing you to create mock and stub objects.

### Important Setup

Write capabilities on disk for the default path of `/testbox/system/testings/stubs`.&#x20;

You can also choose the directory destination for stub creations yourself when you initialize TestBox. If using ColdFusion 9 or Lucee you can even use `ram://` and use the virtual file system.

## Useful Resources

* [Approaches to Mocking](http://www.onjava.com/pub/a/onjava/2004/02/11/mocks.html)
* [Wikipedia Mock Objects](http://en.wikipedia.org/wiki/Mock_object)
* [Using mock objects for complex unit tests IBM developerWorks](http://www-128.ibm.com/developerworks/rational/library/oct06/pollice/index.html)
* [Unit testing with mock objects IBM developerWorks](http://www.ibm.com/developerworks/library/j-mocktest.html)
* [Emergent Design by Scott Bain](http://www.netobjectives.com/emergent-design-evolutionary-nature-professional-software-development)
* [Mocks Aren't Stubs by Martin Fowler](http://martinfowler.com/articles/mocksArentStubs.html)
