1 12 13 package org.eclipse.jdt.internal.junit4.runner; 14 15 import org.eclipse.jdt.internal.junit.runner.ITestIdentifier; 16 import org.junit.runner.Description; 17 18 public class JUnit4Identifier implements ITestIdentifier { 19 private final Description fPlan; 20 21 public JUnit4Identifier(Description plan) { 22 this.fPlan= plan; 23 } 24 25 public String getName() { 26 return fPlan.getDisplayName(); 27 } 28 29 @Override 30 public int hashCode() { 31 return fPlan.hashCode(); 32 } 33 34 @Override 35 public boolean equals(Object obj) { 36 if (! (obj instanceof JUnit4Identifier)) 37 return false; 38 39 JUnit4Identifier id= (JUnit4Identifier) obj; 40 return fPlan.equals(id.fPlan); 41 } 42 43 } 44 | Popular Tags |