Home

Michael's blog is now available on the Click here to order on Amazon.com

Blog

New tutorial! Mocking static methods with PowerMock

"Static methods are the death to testability". I'm sure you've all heard someone say something along those lines. Heck, even Google has blogged about it (http://bit.ly/4mk3fP). And yet, it just doesn't make sense to me. Static methods were added to the Java language for a reason. Just because most toolsets do not support testing of them doesn't mean that static methods are bad. I think it means we need new toolsets. With that in mind, I want to introduce you to PowerMock. In this tutorial, you can read...

Tutorial

How to Mock Static Methods

e have all read it or heard someone talk about it. "Static Methods are Death to Testability". You can read the article here: http://bit.ly/4mk3fP. Something that has become a fundimental piece of the language (all you need to do is look at the Apache Commons project to see that) is so bad that it must be avoided at all costs in the name of testing. Gosling (or someone on his team) put it in the language for a reason and to avoid those uses solely because your toolset doesn't support the testing of it is nonsense. Time to get a new toolset. In this tutorial we will cover how to mock static methods (*gasp) using PowerMock.
More

Widgit

Prototype & script.aculo.us Lightbox

Want lightbox functionality but don't want to add yet another javascript library to your project?  Prototype and script.aculo.us are probably two javascript libraries you already have in your project.  Here we will cover a lightweight way to implement lightbox functionality without adding yet another javascript library.
More

About MichaelMinella.com PDF Print
JavaWelcome to MichaelMinella.com, your home for learning about quality software development.  Although this is my corner of cyberspace, this is your forumn.  This site will only get better with feedback from you.  What do you want to hear about?  What challenges are you facing in your development?  We all are aware of areas where the software development cycle can be improved.  Together we can come up with solutions that will take your development to the next level.  Make no excuses and demand quality.
 
Google Reader

Social Links

Image
View Michael Minella's profile on LinkedIn

Tweets

    Twitter Button from twitbuttons.com