Top "Jmock" questions

For questions about using jMock.

How to mock JdbcTemplate.queryForObject() method

My method looks like this: public class Decompile extends JdbcDaoSupport public void getRunner(){ String val = this.getJdbcTemplate().queryForObject(sql,String.…

java mockito jmock jmockit springmockito
JUnit mocks, which tool should i use?

I come from the PHP testing world and i'm starting testing in Java. I've seen several tools to mock the …

java junit mocking mockito jmock
Can I mock a super class method call?

Sometimes, you want to test a class method and you want to do an expectation on a call of a …

java tdd mocking easymock jmock
Check if a method was called inside another method

Is there any way in java to check if a certain method was called inside another method? I am testing …

java junit jmock
How to get started with testing(jMock)

I'm trying to learn how to write tests. I'm also learning Java, I was told I should learn/use/practice …

java unit-testing testing mocking jmock
JMock unexpected invocation

Below I am just trying to mock a class named TestWrapper and set 'allowing' expecations on it. However, when setting …

java junit jmock assertion
Unit test helper methods?

I have classes which previously had massive methods so I subdivided the work of this method into 'helper' methods. These …

java unit-testing junit jmock helpermethods
Mock a JPA CriteriaBuilder with Mockito

I have a particularly nasty JMock checking() block for a JPA query that I want to migrate to Mockito: Mockery …

java jpa mockito criteria-api jmock
Does Spring @DirtiesContext reload Spring context?

I have a test class that looks like @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:/test-context.xml"}) @DirtiesContext(classMode = ClassMode.…

spring junit4 jmock
Unit testing a Swing component

I am writing a TotalCommander-like application. I have a separate component for file list, and a model for it. Model …

java unit-testing swing jmock