• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file fixtures for unit testing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file fixtures for unit testing


  • Subject: Re: file fixtures for unit testing
  • From: "Colin Barrett" <email@hidden>
  • Date: Sat, 4 Oct 2008 03:59:16 -0700

On Fri, Oct 3, 2008 at 10:01 PM, Brent Hargrave <email@hidden> wrote:
> To unit test an XML parsing method, I would like keep a dummy XML file in a
> project directory and import it into my FooTests class as a fixture of
> sorts.  What is the right way to do this sort of thing?

Add it to the project, and then add it to the test's target. You
should then be able to reference it using -[NSBundle
pathForResource:ofType:]. I'm not 100% that's the way OCUnit/SenTest
targets work, but it would surprise me if they worked otherwise.

Hope that helps,
-Colin
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: file fixtures for unit testing
      • From: Chris Hanson <email@hidden>
References: 
 >file fixtures for unit testing (From: "Brent Hargrave" <email@hidden>)

  • Prev by Date: Re: Load/Save buttons
  • Next by Date: Re: NSTreeController rearrangeObjects doesn't always trigger sorting
  • Previous by thread: file fixtures for unit testing
  • Next by thread: Re: file fixtures for unit testing
  • Index(es):
    • Date
    • Thread