Hi,
Adding @EnableSpringConfigured to my @Configuration sorted the problem!
Regards,
J.



2013/9/19 Julien Martin <[email protected]>

> 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. [SORRY: I FORGOT TO SPECIFY THE SUBJECT, THIS IS A REPOST]
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to