Core Data and OCUnit

2005-06-06 02:00

I've been finding a scarcity of posts on how to write Unit Tests for generated code. Specifically, I've just started working with Core Data on OS X 10.4. It's a fantastic data modeling tool. But given it's GUI nature, it's not immediately obvious how you write test-first code for it. You're supposed to write tests before you write a line of code. But in this case, you need to write test code before you use the GUI to generate the code for you.

It turns out that model created by Core Data supports reflection. It's not that pretty, but I've got a start on it. If you need to write some of your own Core Data test code, hopefully this will help you get on your way:

Welcome

PlayTank, Inc. has been in business for a few years, but as part of our latest IT makeover (more on that later), this is the beginning of our blog. We are an extremely small (currently 1 full time developer) software company. I guess that should, therefore, read as "I am an extremely small software company."

I've worked for software companies large and small, from educational outsourcing shops to nine years at Microsoft. I've worked on compilers, Internet tools, and banking systems. And now I'm going back to my beginnings, working on small projects that interest me, and contracting on larger projects where I can share what I've learned. PlayTank is, obviously, the smallest company I've worked for.

Syndicate content