vendredi 28 avril 2017

DIfference between assertEquals and assertSame

have a similar problem

Genericindex a; 
Genericindex b; 

a= datafrommethod();//returns object of Genericindex 
b= datafrommethod();//returns object of Genericindex 

b= anothermethod(b);//sometimes object might be overriden 

if(notoverridden){ 
assertEquals(a,b);}// this fails 

can someone explain why is assert failing?

Aucun commentaire:

Enregistrer un commentaire