01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.core.tests.databinding.validation;
11:
12: import junit.framework.TestCase;
13:
14: import org.eclipse.core.databinding.validation.ValidationStatus;
15: import org.eclipse.core.runtime.IStatus;
16:
17: /**
18: * @since 1.1
19: */
20: public class ValidationStatusTest extends TestCase {
21: public void testEqualsAndHashCode() throws Exception {
22: String message = "error";
23: Exception e = new IllegalArgumentException();
24: IStatus status1 = ValidationStatus.error(message, e);
25: IStatus status2 = ValidationStatus.error(message, e);
26:
27: assertEquals(status1, status2);
28: assertEquals(status1.hashCode(), status2.hashCode());
29: }
30: }
|