• 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: WOUnit 1.1: @UnderTest annotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOUnit 1.1: @UnderTest annotation


  • Subject: Re: WOUnit 1.1: @UnderTest annotation
  • From: Henrique Prange <email@hidden>
  • Date: Sun, 19 Jun 2011 16:12:27 -0300

Hi Paul,

Let's try something else. Can you add the following code to your test class?

@Rule
public ExpectedException thrown= new ExpectedException();

@Test
public void throwsNullPointerException() {
   thrown.expect(NullPointerException.class);
   throw new NullPointerException();
}

Does the test throwsNullPointerException pass or fail?

I've added more logs to the MockEditingContext to avoid any doubts in
case you want to give it another try. The jar is here [1].

[1]http://dl.dropbox.com/u/9599580/wounit-1.1-debug-2.jar

Cheers,

Henrique

On Sun, Jun 19, 2011 at 2:30 AM, Paul Hoadley <email@hidden> wrote:
> On 19/06/2011, at 1:22 PM, Henrique Prange wrote:
>
>> It seems the MockEditingContext was not initialized as a rule. I have seen this kind of behavior every time I forget the @Rule annotation.
>>
>> That's not the case though. The only reason I can see to ignore the @Rule annotation is an older version of the JUnit runner being used. Could you try to print the JUnit version for your test?
>>
>> System.out.println("JUnit version is: " + junit.runner.Version.id());
>>
>> If the JUnit version is 4.7 or higher, we will have to debug more carefully. Anyway, that is pretty weird.
>
> JUnit version is: 4.8
>
> I'm still not seeing any debug logging from wounit-1.1-debug.jar.  Is there a similar way to get WOUnit to output its version just to confirm it's picking up the right JAR?
>
>
> --
> 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

References: 
 >WOUnit 1.1: @UnderTest annotation (From: Paul Hoadley <email@hidden>)
 >Re: WOUnit 1.1: @UnderTest annotation (From: Henrique Prange <email@hidden>)
 >Re: WOUnit 1.1: @UnderTest annotation (From: Paul Hoadley <email@hidden>)
 >Re: WOUnit 1.1: @UnderTest annotation (From: Henrique Prange <email@hidden>)
 >Re: WOUnit 1.1: @UnderTest annotation (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: WOUnit 1.1: @UnderTest annotation
  • Next by Date: Question about Monitor & wotaskd on Mac OS X
  • Previous by thread: Re: WOUnit 1.1: @UnderTest annotation
  • Next by thread: WOImage, WebServerResources, and absolute paths
  • Index(es):
    • Date
    • Thread