/** * Ensures that trying to convert an {@link EEnum} from another package to String yields the * expected exception. * * @generated */ @Test public void testConvertUnknownEEnumToString() { try { EEnum eEnum = EcoreFactory.eINSTANCE.createEEnum(); ((EClassifierImpl) eEnum).setClassifierID(-1); CompareFactory.eINSTANCE.convertToString(eEnum, eEnum); fail("Expected IllegalArgumentException hasn't been thrown"); } catch (IllegalArgumentException e) { // Expected behavior } }
/** * Ensures that trying to create an {@link EEnum} from another package from String yields the * expected exception. * * @generated */ @Test public void testCreateUnknownEEnumFromString() { try { EEnum eEnum = EcoreFactory.eINSTANCE.createEEnum(); ((EClassifierImpl) eEnum).setClassifierID(-1); CompareFactory.eINSTANCE.createFromString(eEnum, "ThisShouldntBeAKnownEEnumLiteral"); fail("Expected IllegalArgumentException hasn't been thrown"); } catch (IllegalArgumentException e) { // Expected behavior } }
/** * Ensures that trying to create an {@link EClass} from another package yields the expected * exception. * * @generated */ @Test public void testCreateUnknownEClass() { try { EClass eClass = EcoreFactory.eINSTANCE.createEClass(); ((EClassifierImpl) eClass).setClassifierID(-1); CompareFactory.eINSTANCE.create(eClass); fail("Expected IllegalArgumentException hasn't been thrown"); } catch (IllegalArgumentException e) { // Expected behavior } }