blob: 05a7a1173581fc15ab709e85b86d4fad01f1d3ee [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.core.tests.databinding.validation;
import static org.junit.Assert.assertEquals;
import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.runtime.IStatus;
import org.junit.Test;
/**
* @since 1.1
*/
public class ValidationStatusTest {
@Test
public void testEqualsAndHashCode() throws Exception {
String message = "error";
Exception e = new IllegalArgumentException();
IStatus status1 = ValidationStatus.error(message, e);
IStatus status2 = ValidationStatus.error(message, e);
assertEquals(status1, status2);
assertEquals(status1.hashCode(), status2.hashCode());
}
}