| /***************************************************************************** |
| * Copyright (c) 2017 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: |
| * Francois LE FEVRE (CEA) francois.le-fevre@cea.fr - Initial API and Implementation |
| * |
| *****************************************************************************/ |
| package org.eclipse.papyrus.developer.migration.elementtypereference.expansionmodel.test; |
| |
| |
| |
| import static org.junit.Assert.assertEquals; |
| |
| import java.io.File; |
| import java.io.IOException; |
| |
| import org.apache.commons.io.FileUtils; |
| import org.eclipse.papyrus.developer.migration.elementtypereference.expansionmodel.ElementTypeMigrationExpansionModel; |
| import org.junit.Test; |
| |
| |
| /** |
| * |
| * Dedicated to test migration for elementtype in expansionmodel |
| * |
| */ |
| public class ElementTypeMigrationExpansionModelTest { |
| |
| |
| @Test |
| public void myFirstTest() { |
| String folderRootGit4ElementtypeData = new String("src/test/resources/input/"); |
| String folderRootGit4ExpansionModel = new String("src/test/resources/input/"); |
| String outputRootFolder = new String("target"); |
| ElementTypeMigrationExpansionModel myElementTypeMigrationCreationMenuModel = new ElementTypeMigrationExpansionModel(folderRootGit4ElementtypeData); |
| |
| myElementTypeMigrationCreationMenuModel.migrateModelDocuments(folderRootGit4ExpansionModel, outputRootFolder); |
| |
| File file1 = new File("src/test/resources/output/AddBorderItem.xmi"); |
| File file2 = new File("target/test-classes/output/AddBorderItem.xmi"); |
| try { |
| System.err.println(file1.getAbsolutePath()); |
| System.err.println(file2.getAbsolutePath()); |
| boolean isTwoEqual = FileUtils.contentEquals(file1, file2); |
| assertEquals(true, isTwoEqual); |
| } catch (IOException e) { |
| // TODO Auto-generated catch block |
| e.printStackTrace(); |
| } |
| } |
| |
| } |