New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
iOS Development Discussion on developing apps for the iOS platform.

Unit testing initialization code

Post Reply New Thread Subscribe

Thread Tools

Member Since: Aug 27, 2011
Posts: 6
tron_thomas is on a distinguished road

tron_thomas is offline
I am trying to write an appliction for the iPad using Xcode 4.3 and a 3rd party game engine. I also want to write unit test for the components in my application.

Currently I'm trying to write a unit test for an object performs some operations during initialization of the application. Basically the object will obtain an instance of another object (provided via a mock in the unit test) and does something with that other object.

The problem right now is that the code exists in the initialization phase of the application. This means that before the unit test can actually run the application itself gets launched and tries to initialize itself. The object under test tried to obtain the other object it needs. This fails because the functionality has been written yet (I'm still trying to write the tests for it) and the application dies before the test can run.

The whole fact that the application even tries to run during the unit test seems totally screwy from the way unit testing is actually done.

How is someone supposed to unit test code like this?
QUOTE Thanks

Post Reply New Thread Subscribe

« New to iOS development. Where do I start? | Soundboard problem please help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
3ware RAID driver Das_Human OS X - Development and Darwin 4 08-08-2009 09:17 PM
Malicious code .... how much of a risk taker are you ? McBie Schweb's Lounge 4 12-13-2008 12:52 PM

All times are GMT -4. The time now is 09:27 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?