clone() public method

public clone ( ) : ModelCreator
return ModelCreator
Ejemplo n.º 1
0
 public void test_ModelCreator_clone()
 {
     ModelCreator mc = new ModelCreator();
       mc.setFamilyName("Keating");
       mc.setEmail("*****@*****.**");
       assertTrue( mc.getFamilyName() ==  "Keating" );
       assertTrue( mc.getEmail() ==  "*****@*****.**" );
       ModelCreator mc2 = (ModelCreator) mc.clone();
       assertTrue( mc2.getFamilyName() ==  "Keating" );
       assertTrue( mc2.getEmail() ==  "*****@*****.**" );
       mc2 = null;
       mc = null;
 }