Skip to main content
summaryrefslogtreecommitdiffstats
blob: 537189cf9fae650766ce51aa99ce2ba1470d50e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
 * Copyright (c) 2007, 2010 Oracle Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *     Oracle Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.jst.jsf.common.metadata.tests.updated;

import java.io.IOException;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;

public class MetaDataExceptionTests extends TestCase {

	public void testMetaDataException() {
		MetaDataException e = new MetaDataException();
		Assert.assertNotNull(e);
	}

	public void testMetaDataExceptionString() {
		MetaDataException e = new MetaDataException("Foo");
		Assert.assertNotNull(e);
		Assert.assertEquals("Foo", e.getMessage());
	}

	public void testMetaDataExceptionStringThrowable() {
		IOException cause = new IOException("FooBar");
		MetaDataException e = new MetaDataException("Foo", cause );
		Assert.assertNotNull(e);
		Assert.assertEquals(cause, e.getCause());
		Assert.assertNotNull(e.getCause());
	}

}

Back to the top