Skip to content
Snippets Groups Projects

arrow head in gpml

Merged Piotr Gawron requested to merge merge-14.0.13 into master
7 files
+ 111
88
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -119,45 +119,6 @@ public class ModifierTypeUtilsTest extends CellDesignerTestFunctions {
utils.updateLineEndPoint(operator);
}
@Test(expected = InvalidStateException.class)
public void testCreateInvalidModifierForStringType2() throws Exception {
// artificial implementation of Modifier that is invalid
class InvalidModifier extends Modifier {
private static final long serialVersionUID = 1L;
@SuppressWarnings("unused")
public InvalidModifier() {
throw new NotImplementedException();
}
@SuppressWarnings("unused")
public InvalidModifier(Species alias, CellDesignerElement<?> element) {
throw new NotImplementedException();
}
}
// mopdify one of the elements of OperatorType so it will have invalid
// implementation
ModifierType typeToModify = ModifierType.CATALYSIS;
Class<? extends Modifier> clazz = typeToModify.getClazz();
try {
Field field = typeToModify.getClass().getDeclaredField("clazz");
field.setAccessible(true);
field.set(typeToModify, InvalidModifier.class);
// and check if we catch properly information about problematic
// implementation
utils.createModifierForStringType(typeToModify.getStringName(), new GenericProtein("id"));
} finally {
// restore correct values for the modified type (if not then other test
// might fail...)
Field field = typeToModify.getClass().getDeclaredField("clazz");
field.setAccessible(true);
field.set(typeToModify, clazz);
}
}
@Test(expected = InvalidArgumentException.class)
public void testCreateModifierForStringType2() throws Exception {
utils.createModifierForStringType("unjkType", null);
Loading