/******************************************************************************* | |
* <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.emf.common.util.URI; | |
import org.eclipse.emf.transaction.RecordingCommand; | |
import org.eclipse.fmc.ConnectionTest; | |
import org.eclipse.fmc.blockdiagram.editor.util.DiagramFactory; | |
import org.junit.After; | |
import org.junit.Test; | |
public class MetaConnectionTest extends ConnectionTest { | |
@Override | |
protected void createFMCFile(IFile file) { | |
DiagramFactory.createDefaultBlockdiagramMetaFile(URI.createPlatformResourceURI( | |
file.getFullPath().toString(), true), 1000, 1000, 10); | |
} | |
@Test | |
@Override | |
public void testUnidirectionalAccessMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testUnidirectionalAccessMH(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testUnidirectionalAccessFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testUnidirectionalAccessFF(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testBidirectionalAccessMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testBidirectionalAccessMH(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testBidirectionalAccessFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testBidirectionalAccessFF(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testModifyAccess() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testModifyAccess(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testBidirectionalComChannelMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super | |
.testBidirectionalComChannelMH(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testBidirectionalComChannelFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super | |
.testBidirectionalComChannelFF(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testUnidirectionalComChannelMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super | |
.testUnidirectionalComChannelMH(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testUnidirectionalComChannelFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super | |
.testUnidirectionalComChannelFF(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testReqResComChannelMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testReqResComChannelMH(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testReqResComChannelFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testReqResComChannelFF(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testDotsMH() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testDotsMH(); | |
} | |
}); | |
} | |
@Override | |
public void testDotsMHWithoutTarget() { | |
// Not supported | |
} | |
@Test | |
@Override | |
public void testDotsFF() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testDotsFF(); | |
} | |
}); | |
} | |
@Override | |
public void testDotsFFWithoutTarget() { | |
// Not supported | |
} | |
@Test | |
@Override | |
public void testContainerRemove() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super.testContainerRemove(); | |
} | |
}); | |
} | |
@Test | |
@Override | |
public void testConnectToStructureVariance() { | |
getEditingDomain().getCommandStack().execute( | |
new RecordingCommand(getEditingDomain()) { | |
@Override | |
protected void doExecute() { | |
MetaConnectionTest.super | |
.testConnectToStructureVariance(); | |
} | |
}); | |
} | |
@Override | |
@After | |
public void tearDown() { | |
MetaTestUtil.assertMetaFileExists(getProject(), BLOCKDIAG_FILENAME); | |
super.tearDown(); | |
} | |
} |