• 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: Bundle loading during unit testing outside Eclipse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bundle loading during unit testing outside Eclipse


  • Subject: Re: Bundle loading during unit testing outside Eclipse
  • From: Paul Hoadley <email@hidden>
  • Date: Wed, 21 Sep 2011 09:53:53 +0930

Hi Chuck,

On 21/09/2011, at 8:44 AM, Chuck Hill wrote:

>>> Are the frameworks embedded in that bundle?
>>
>> Yes.
>
> You could try loading them from there instead.  Just grab all the paths to jar files under Contents/Frameworks.

I'll try that shortly.

>>> Try getting the classloader in one of your tests and print out the classpath that it really is using.
>>
>> It's as expected, including:
>>
>> /Users/paulh/tmp/WT/workspace/Root/Library/Frameworks/JavaMemoryAdaptor.framework/Resources/Java/JavaMemoryAdaptor.jar
>
> What if you change this code:
>
> private void fixJavaMemoryDictionary() {
> 	NSBundle bundle = NSBundle.bundleForName("JavaMemoryAdaptor");
> 	bundle._infoDictionary().takeValueForKey(ERMemoryAdaptor.class.getName(), "EOAdaptorClassName");
> }
>
> to this:
> private void fixJavaMemoryDictionary() {
> 	NSBundle bundle = NSBundle.bundleForClass(ERMemoryAdaptor.class);
> 	bundle._infoDictionary().takeValueForKey(ERMemoryAdaptor.class.getName(), "EOAdaptorClassName");
> }
>
>
> e.g. can it find it by class?

I can't easily change the WOUnit code in the test environment I've got set up here (that method above is from WOUnit), but I am executing that code in a test method, and it's coming back null.


--
Paul.

http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Bundle loading during unit testing outside Eclipse
      • From: Paul Hoadley <email@hidden>
References: 
 >Bundle loading during unit testing outside Eclipse (From: Paul Hoadley <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Chuck Hill <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Paul Hoadley <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Chuck Hill <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Paul Hoadley <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Chuck Hill <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Paul Hoadley <email@hidden>)
 >Re: Bundle loading during unit testing outside Eclipse (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Bundle loading during unit testing outside Eclipse
  • Next by Date: Re: EOModelDoc output no longer viewable with Safari 5.1, Firefox 5.0.1
  • Previous by thread: Re: Bundle loading during unit testing outside Eclipse
  • Next by thread: Re: Bundle loading during unit testing outside Eclipse
  • Index(es):
    • Date
    • Thread