blob: 487ee5cc1887dab84498ca5d8c03375b0aa36a22 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014 itemis AG 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:
* Mark Broerkens (itemis AG) - initial API and implementation
*******************************************************************************/
package org.eclipse.rmf.tests.reqif10.serialization.uc000.tc4001;
import static org.junit.Assert.assertFalse;
import java.util.Iterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.rmf.reqif10.ReqIF;
import org.eclipse.rmf.tests.reqif10.serialization.util.AbstractTestCase;
import org.junit.BeforeClass;
import org.junit.Test;
@SuppressWarnings("nls")
public class TC0004001ToolExtensionWithCustomRuntimeCreatedMetamodelTests extends AbstractTestCase {
static final String TEST_CASE_ID = "TC0004001";
static final String REFERENCE_DATA_FILENAME = getWorkingFileName(getReferenceDataFileName(TEST_CASE_ID, false));
static final String EXPORT_DATA_FILENAME = getWorkingFileName(getFirstExportFileName(TEST_CASE_ID, false));
static ReqIF originalReqIF = null;
static ReqIF loadedReqIF = null;
@BeforeClass
public static void setupOnce() throws Exception {
AbstractTestCase.setupOnce();
originalReqIF = new TC0004001ToolExtensionWithCustomRuntimeCreatedMetamodelModelBuilder().getReqIF();
saveReqIFFile(originalReqIF, REFERENCE_DATA_FILENAME);
loadedReqIF = loadReqIFFile(REFERENCE_DATA_FILENAME);
}
@Test
public void testNoXMLAnyType() {
Iterator<EObject> iterator = EcoreUtil.getAllContents(loadedReqIF, true);
while (iterator.hasNext()) {
EObject eObject = iterator.next();
assertFalse(eObject instanceof AnyType);
}
}
}