blob: 19d572f6d08e220e7231a4b91f4b7bc64ce993c2 [file] [log] [blame]
/*****************************************************************************
* 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.creationmenumodel.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.creationmenumodel.ElementTypeMigrationCreationMenuModel;
import org.junit.Test;
/**
*
* Dedicated to test migration for elementtype in creationmenumodel
*
*/
public class ElementTypeMigrationCreationMenuModelTest {
@Test
public void myFirstTest() {
String folderRootGit4ElementtypeData = new String("src/test/resources/input/");
String folderRootGit4CreationMenuModel = new String("src/test/resources/input/");
String outputRootFolder = new String("target");
ElementTypeMigrationCreationMenuModel myElementTypeMigrationCreationMenuModel = new ElementTypeMigrationCreationMenuModel(folderRootGit4ElementtypeData);
myElementTypeMigrationCreationMenuModel.migrateModelDocuments(folderRootGit4CreationMenuModel, outputRootFolder);
File file1 = new File("src/test/resources/output/DeployUndeployTests.creationmenumodel");
File file2 = new File("target/test-classes/output/DeployUndeployTests.creationmenumodel");
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();
}
}
}