When i am running my play code with jacoco:cover, the test cases execution are failing when the constructor is called.
SImply put: My test code is like
@Test
public void ValidSessionIdFindBySessionId() throws Exception
{
RightnowAccount rightnowAccount = new RightnowAccount("Login", "Password", 123, "SessionId");
}
My Class and the constructor:
public class RightnowAccount extends Model
{
private static final Logger logger = org.apache.log4j.Logger.getLogger(RightnowAccount.class);
@Id
public String login;
public String password;
public int accountId;
String sessionId;
Timestamp createdTimeStamp;
Timestamp updatedTimeStamp;
public RightnowAccount (String login)
{
this.login = login;
}
public RightnowAccount (String login,String password,int accountId,String sessionId)
{
this.login = login;
this.password = password;
this.accountId = accountId;
this.sessionId = sessionId;
}
}
When i am running the test code as play:cover, my test case fails with error:
error] Test com.flipkart.rightnow.connection.RightnowAuthTest.ValidSessionIdFindBySessionId failed: missing behavior definition for the preceding method call:
[error] RightnowAccount.$jacocoInit()
[error] Usage is: expect(a.foo()).andXXX()
[error] at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:42)
Aucun commentaire:
Enregistrer un commentaire