mardi 25 août 2015

How to test the argument passed in the object creation by new operator

I want to test the argument passed in the constructor. For eg:

`

Class A
{
public void function (String arg1, String arg2) {
C c = new C(arg1, arg2);
//....
}
}

`

In this, I want to test the arg1 value which is being passed while creating object of Class C. Is there a way of doing t without using power mock.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire