Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Testing an Aspect Class

I developed a Framework Mck4Aj to unit test aspects using Mocks and verify pointcut matching.

Maybe it might help you.

https://github.com/mock4aj/mock4aj


In your case I think this could work with Mock4Aj:

Hello  helloMock = mock(Hello.class); // Using Mokito
Hello helloWeaved = createWeavedProxy(helloMock, HelloAspect.class);

hello.hello();

verify(helloMock).aloha();



--
Félix-Antoine Bourbonnais

Twitter   : @fbourbonnais
LinkedIn: linkedin.com/in/fbourbonnais/fr


Back to the top