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;
11:
12: import org.eclipse.core.databinding.AggregateValidationStatus;
13: import org.eclipse.core.databinding.DataBindingContext;
14: import org.eclipse.core.databinding.observable.Realm;
15: import org.eclipse.core.runtime.IStatus;
16: import org.eclipse.jface.tests.databinding.AbstractSWTTestCase;
17:
18: /**
19: * @since 1.1
20: */
21: public class AggregateValidationStatusTest extends AbstractSWTTestCase {
22: public void testAggregateValidationStatusValueType()
23: throws Exception {
24: DataBindingContext dbc = new DataBindingContext();
25: AggregateValidationStatus status = new AggregateValidationStatus(
26: dbc.getBindings(),
27: AggregateValidationStatus.MAX_SEVERITY);
28: assertEquals(IStatus.class, status.getValueType());
29: }
30:
31: public void testConstructor_DefaultRealm() throws Exception {
32: DataBindingContext dbc = new DataBindingContext();
33: AggregateValidationStatus status = new AggregateValidationStatus(
34: dbc.getBindings(),
35: AggregateValidationStatus.MAX_SEVERITY);
36: assertEquals(Realm.getDefault(), status.getRealm());
37: }
38: }
|