Category Selected:

testbox

Blog

Unit Testing with Mock Objects via MockBox

Luis Majano |  May 17, 2010

Once you get an appreciation for the importance of unit testing and integration testing is when we reach a new level in our development careers.  Testing is critical to mission critical applications, and even for our own little projects, where we test that our code should work as expected.  There’s that word again, expected.  Expectations in unit testing is like a nasty hamburger at a soccer match in El Salvador.  They go hand in hand :)

Read More

Join me at the Pecha Kucha BOF at cf.Objective()

Curt Gratz |  April 16, 2010

  Pecha Kucha BOF

I am very excited for this years cf.Objective().  This will be my third year and each year it has gotten better and I always leave inspired and ready to improve all aspects of my craft.  It is great to be surrounded by like minded individuals with the same goal to make themselves better at what they do. 

This year I have the unique honor to present at the Pecha Kucha BOF that Bob Silverberg organized.  I will be presenting on Mocking, it's not just for picking on people.  So, you should come join the crowd at the BOF and mock me, or at least learn new ways to mock. 

If you haven't registered for cf.Objective().  I believe you still can today.  You should also be sure to register for the ColdBox  1 day training workshop.  So, stop what your doing right now and head on over to the registration page and go for it.

Hope to see you at the BOF.  And thanks Bob for organizing it.

Read More

MockBox 1.2 Released!

Luis Majano |  March 19, 2010
I am happy to announce today a new release for MockBox: version 1.2. This can be downloaded standalone or via ColdBox 3.0.0 Nightly. This release brings in some more stability, faster code generation and some new functionality for you mock enthusiasts!

Read More


MockBox - It's not just for unit testing

Curt Gratz |  March 19, 2010

MockBox can have many amazing uses.  One well documented use is in assistance in creating complicated unit tests insuring you are only testing one small unit of work, it can be used for many other interesting use cases.

One of the ways we find MockBox useful during our development cycle at Computer Know How is to Mock objects we haven't had the time to complete yet, but we do know what we expect as response.  This allows us to continue development without waiting for the piece of something we haven't done yet slow us down, but keep the method calls exactly as they will be in when the object is complete.

So, how do you use MockBox outside of the context of a unit test?  Well, its easy.  

Inside a ColdBox application.

//get an instance of mockbox to use for mocking things not 100% built yet inside a ColdBox app mockBox = createObject("component","coldbox.system.testing.MockBox").init();

Outside a ColdBox application.

//get an instance of mockbox to use for mocking things not 100% built yet outside a ColdBox app. mockBox = createObject("component","mockbox.system.testing.MockBox").init();

Now that MockBox is initialized, we can start mocking objects. Lets say we have a User Object that we haven't had time to build yet. Right now it looks really advanced with lots of cool properties and functions that we spent a ton of time on. Something like this.

cfcomponent hint="I am the User ORM cfc" /cfcomponent

Read More

Very interesting MockBox Post!

Luis Majano |  March 16, 2010
Brian Car over at this blog has written an excellent entry on the benefits of Mocking with MockBox.  If you are a newbie to mocking, or an expert mocker :) then head over to his blog and check it out: http://cfcommons.org/index.cfm/blog/2010/3/13/unit-testing-done-right-with-mock-objects


LogBox 1.1 and MockBox 1.1 Released!

Luis Majano |  January 18, 2010
Welcome to another week of wonderful releases.  We start of with our two awesome logging and mocking frameworks LogBox and MockBox.  They have both just graduated to version 1.1 and can be downloaded today as standalone frameworks or via the 3.0.0 M4 bundle, ahh yes, another blog post a...
Read More

MockBox hits 1.0, get it now!

Luis Majano |  November 13, 2009
MockBox has now reached a 1.0 release and can be downloaded now!  For those of you who don't know, MockBox is a companion framework to the ColdBox Pla...
Read More

MockBox RC 1 Release!

Luis Majano |  October 07, 2009
MockBox RC1 is now released!  This release adds some simple syntax fixes and cleanup of the core code.  We are also preparing...
Read More

Mocking Objects with ColdBox Annotations

Luis Majano |  June 12, 2009
One of the nice things about ColdBox's model integration features are the ability to inject objects by using annotations via the cfproperty tag.  This gives a cleaner API to objects that don't really need to expose setters just for dependency injection purposes.  Why? well, in MY opinion, objects should be shy and only expose what they need to expose to the outside world.  By leveraging annotations, I can cleanly define the dependencies of my object and what is even better, it can...
Read More

Introducing MockBox: The ColdBox Mocking Framework

Luis Majano |  June 09, 2009
I am proud to announce another addition to our ColdBox Platform: MockBox.  MockBox is a companion package to the ColdBox Platform that will give you advanced mocking/stubing capabilities; hence a Mocking Framework. Not only does it integrat...
Read More