blob: 89b4b4b78ab6a6736f481a0525bd9785754ddd96 (
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
45
46
|
/*****************************************************************************
* Copyright (c) 2015 CEA LIST 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:
* Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.nattable.tests.tests.configs;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.Diagnostician;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.junit.Assert;
import org.junit.Test;
/**
* Test the genericTreeTable nattable model :
* - validate the model
*
* @author Benoit Maggi
*/
public class GenericTreeTableNattableConfigurationTest extends AbstractPapyrusTest{
// path to the model
public static final String GENERIC_TREE_TABLE_CONFIGURATION_MODEL_PATH = org.eclipse.papyrus.uml.nattable.Activator.PLUGIN_ID+"/configs/genericTreeTable.nattableconfiguration"; //$NON-NLS-0$
/**
* Validate the model with the rules defined in the meta-model tooling
*/
@Test
public void validateGenericTreeTableConfigurationModel() {
URI createPlatformPluginURI = URI.createPlatformPluginURI(GENERIC_TREE_TABLE_CONFIGURATION_MODEL_PATH, true);
Resource resource = new ResourceSetImpl().getResource(createPlatformPluginURI, true);
Diagnostic diagnostic = Diagnostician.INSTANCE.validate(resource.getContents().get(0));
Assert.assertEquals("The genericTreeTable.nattableconfiguration model is not valid ", Diagnostic.OK, diagnostic.getSeverity());
}
}
|