KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > junit > runner > junit3 > JUnit3Identifier


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * David Saff (saff@mit.edu) - initial API and implementation
11  * (bug 102632: [JUnit] Support for JUnit 4.)
12  *******************************************************************************/

13
14 /**
15  *
16  */

17 package org.eclipse.jdt.internal.junit.runner.junit3;
18
19 import org.eclipse.jdt.internal.junit.runner.ITestIdentifier;
20
21 class JUnit3Identifier implements ITestIdentifier {
22     private final JUnit3TestReference ref;
23
24     JUnit3Identifier(JUnit3TestReference ref) {
25         this.ref = ref;
26     }
27
28     public String JavaDoc getName() {
29         return ref.getName();
30     }
31     
32     public boolean equals(Object JavaDoc obj) {
33         JUnit3Identifier id = (JUnit3Identifier) obj;
34         return ref.equals(id.ref);
35     }
36     
37     public int hashCode() {
38         return ref.hashCode();
39     }
40 }
Popular Tags