/******************************************************************************* | |
* <copyright> | |
* | |
* Copyright (c) 2013, 2013 SAP AG. | |
* 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: | |
* SAP AG - initial API, implementation and documentation | |
* | |
* </copyright> | |
* | |
*******************************************************************************/ | |
package org.eclipse.fmc.meta; | |
import org.eclipse.core.resources.IFile; | |
import org.eclipse.core.resources.IProject; | |
import org.eclipse.core.runtime.AssertionFailedException; | |
import org.eclipse.core.runtime.Path; | |
public class MetaTestUtil { | |
private MetaTestUtil() { | |
} | |
public static void assertMetaFileExists(IProject project, String blockfile) { | |
final IFile file = project.getFile(new Path(blockfile.replace( | |
".blockdiag", "fmc"))); | |
if (!file.exists()) | |
throw new AssertionFailedException( | |
"Meta file does not exist! Expected location: " | |
+ file.getLocationURI()); | |
} | |
} |