41
41
public class PrototypeTest <P extends Prototype > {
42
42
static Collection <Object []> dataProvider () {
43
43
return Arrays .asList (
44
- new Object []{new OrcBeast (), "Orcish wolf" },
45
- new Object []{new OrcMage (), "Orcish mage" },
46
- new Object []{new OrcWarlord (), "Orcish warlord" },
47
- new Object []{new ElfBeast (), "Elven eagle" },
48
- new Object []{new ElfMage (), "Elven mage" },
49
- new Object []{new ElfWarlord (), "Elven warlord" }
44
+ new Object []{new OrcBeast ("axe" ), "Orcish wolf attacks with axe " },
45
+ new Object []{new OrcMage ("sword" ), "Orcish mage attacks with sword " },
46
+ new Object []{new OrcWarlord ("laser" ), "Orcish warlord attacks with laser " },
47
+ new Object []{new ElfBeast ("cooking" ), "Elven eagle helps in cooking " },
48
+ new Object []{new ElfMage ("cleaning" ), "Elven mage helps in cleaning " },
49
+ new Object []{new ElfWarlord ("protecting" ), "Elven warlord helps in protecting " }
50
50
);
51
51
}
52
52
@@ -55,7 +55,7 @@ static Collection<Object[]> dataProvider() {
55
55
public void testPrototype (P testedPrototype , String expectedToString ) throws Exception {
56
56
assertEquals (expectedToString , testedPrototype .toString ());
57
57
58
- final Object clone = testedPrototype .clone ();
58
+ final Object clone = testedPrototype .copy ();
59
59
assertNotNull (clone );
60
60
assertNotSame (clone , testedPrototype );
61
61
assertSame (testedPrototype .getClass (), clone .getClass ());
0 commit comments