I am using easymock to test my class. After writing codes, I find out that every test succeeds even given wrong inputs. From the forums on stack overflow, I have seen that it could be avoided by using the replay
method but it even succeeds when I use replay
as well. I don't know what I am doing wrong? Could you please look at the code and tell me If I have to do any more things to make test fail ? I think test is not working ..
service = EasyMock.createMock(MyService.class);
menu = EasyMock.createMock(ISPFMenu.class);
menu.setName("name");
menu.setTitle("title");
EasyMock.expect(service.createLinesToParseEasyMock(menu)).andReturn(null);
EasyMock.replay(service);