
powermock.examples.partialmocking.StatusSender Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powermock-examples-documentationexamples Show documentation
Show all versions of powermock-examples-documentationexamples Show documentation
Examples used to document various PowerMock features.
The newest version!
package powermock.examples.partialmocking;
/**
* Used to demonstrate PowerMock's ability to partial mock method calls.
*
* Created by Katharina Laube on 08.09.2014.
*/
public class StatusSender {
EntityManager entityManager = new EntityManager();
public boolean handleStatus(Status status){
entityManager.persist(status);
return sendStatus(status);
}
public boolean sendStatus(Status status){
// code that will not be tested with handleStatus method
// (i.e. send status via a topic)
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy