(Aspectj-Users) Using AspectJ and Mock Objects
(Aspectj-Users) Using AspectJ and Mock Objects
html
(https://www.eclipse.org/)
[Date Prev (msg00862.html)][Date Next (msg00864.html)][Thread Prev (msg00861.html)][Thread Next (msg00866.html)][Date Index (mail146.html#00863)]
[Thread Index (thrd145.html#00863)] [List Home (https://www.eclipse.org/mailman/listinfo/aspectj-users)]
[aspectj-users] Using AspectJ and mock objects
• From: "SADER, KEITH D (Contractor)" <KEITH.D.SADER@xxxxxxxx (mailto:[email protected])>
• Date: Thu, 31 Jul 2003 14:25:40 -0500
• Delivered-to: aspectj-users@xxxxxxxxxxx (mailto:[email protected])
• List-archive: <http://dev.eclipse.org/pipermail/aspectj-users/ (http://dev.eclipse.org/pipermail/aspectj-users/)>
• List-help: <mailto:[email protected]?subject=help (mailto:[email protected]?subject=help)>
• List-subscribe: <http://dev.eclipse.org/mailman/listinfo/aspectj-users (http://dev.eclipse.org/mailman/listinfo/aspectj-users)>, <mailto:aspectj-users-
[email protected]?subject=subscribe (mailto:[email protected]?subject=subscribe)>
• List-unsubscribe: <http://dev.eclipse.org/mailman/listinfo/aspectj-users (http://dev.eclipse.org/mailman/listinfo/aspectj-users)>, <mailto:aspectj-users-
[email protected]?subject=unsubscribe (mailto:[email protected]?subject=unsubscribe)>
• Thread-index: AcNXmX6AzcW8B3b/QEaPpClQO3zWcw==
• Thread-topic: Using AspectJ and mock objects
Hi, I'm trying to use aspects to mock 'on the fly' a domain layer class. I've tried to follow Nicholas Leseicki's great article at http://www-106.i
My aspect looks like this - real names replaced to protect the innocent.
import java.util.Collection;
// import other stuff
Why would this happen? I believe I'm only calling into the mocked DAO once.
// test case
public void testFind()
{
assertTrue(0 < daoCollaborator.find("search"));
}
// MyMockDAO over-ride
public Collection findStuff(String searchStr)
{
return mockStuff;
}
Second question/behavior.
Is it possible for me to just return the MockDAO whenever the DAO is invoked/used? It would make it easier for me to just return the mock object re
thanks,
---
Keith Sader
Nash Resources Group sub-contracting for Computer Sciences Corporation
IAD:TFAS
Email:keith.d.sader@xxxxxxxx
We've got a blind date with destiny, and it looks like she ordered the lobster.
• Follow-Ups:
◦ Re: [aspectj-users] Using AspectJ and mock objects--again (msg00867.html)
▪ From: Nicholas Lesiecki
◦ Re: [aspectj-users] Using AspectJ and mock objects (msg00866.html)
▪ From: Nicholas Lesiecki
(https://twitter.com
(https://www.facebook.com
(https://www.youtube.com
(https://www.linkedin.com
/EclipseFdn)
/eclipse.org)
/user/EclipseFdn)
/company
/eclipse-
foundation)