• 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: Sat, 18 Jun 2011 15:28:56 -0300

Hi Paul,

You didn't misread. It's supposed to work. :)

Could you try to run the same test using this WOUnit package [1] and send me the produced log? This package adds some log messages that can help solving the problem.

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

Cheers,

Henrique

On 18/06/2011, at 01:10, Paul Hoadley wrote:

Hi Henrique,

I wonder if I am mis-reading the documentation on the @UnderTest annotation here:

http://hprange.github.com/wounit/usage.html

It seems like it should be sufficient to instantiate a MockEditingContext with a @Rule annotation, and then just declare an EO with the @UnderTest annotation.  Yet this code fragment tells me category is null:

public class CategoryTest {
@UnderTest
private Category category;

@Rule
public MockEditingContext ec = new MockEditingContext("Survey");

@Test
public void categoryMustHaveDescriptionAndName() {
System.out.println("CategoryTest.categoryMustHaveDescriptionAndName: category = "
+ category);

This is running inside Eclipse 3.6.2, which seems to have JUnit 4.8 built in.  Is there a step I'm missing?


-- 
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: WOUnit 1.1: @UnderTest annotation
      • From: Paul Hoadley <email@hidden>
References: 
 >WOUnit 1.1: @UnderTest annotation (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: More advice please about WO project..
  • Next by Date: WOImage, WebServerResources, and absolute paths
  • Previous by thread: WOUnit 1.1: @UnderTest annotation
  • Next by thread: Re: WOUnit 1.1: @UnderTest annotation
  • Index(es):
    • Date
    • Thread