Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] (no subject)

Hi Julien,

I don't the answer I'm afraid, but someone on the forum here:


will know.

cheers,
Andy


On 19 September 2013 10:32, Julien Martin <balteo@xxxxxxxxx> wrote:
Hello,

I have the following aspect (aj file) in a Spring app:

@Configurable
public aspect AdvertisementExistsAndBelongsToMemberCheckAspect {

@Autowired
private AdvertisementService advertisementService;
...


I am trying to unit test a controller method advised by this aspect using Spring web/MVC test and the advertisementService dependency is always null although I have mocked it as follows in my JUnit class:

@Bean public AdvertisementService advertisementService() { return mock(AdvertisementService.class); }

I am not sure what I am getting wrong. Can anyone please advise?

Regards,

Julien.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top