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

WOUnit 1.1: @UnderTest annotation


  • Subject: WOUnit 1.1: @UnderTest annotation
  • From: Paul Hoadley <email@hidden>
  • Date: Sat, 18 Jun 2011 13:40:32 +0930

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: Henrique Prange <email@hidden>
  • Prev by Date: Re: More advice please about WO project..
  • Next by Date: Re: More advice please about WO project..
  • Previous by thread: Re: New WebObjects / Wonder Website is born
  • Next by thread: Re: WOUnit 1.1: @UnderTest annotation
  • Index(es):
    • Date
    • Thread