@Test(expected = XmiMissingAttributeException.class) public void testGetIdRefSadPath() { when(mockReader.getAttributeValue(any(String.class), any(String.class))).thenReturn(null); XmiReader.getIdRef(mockReader); }
protected static final Identifier getIdRef(final XMLStreamReader reader) throws XmiMissingAttributeException { final String value = reader.getAttributeValue(GLOBAL_NAMESPACE, XmiAttributeName.IDREF.getLocalName()); if (value != null) { return Identifier.fromString(value); } else { throw new XmiMissingAttributeException(XmiAttributeName.IDREF.getLocalName()); } }
XmiReader { protected static final Identifier getIdRef(final XMLStreamReader reader) throws XmiMissingAttributeException { final String value = reader.getAttributeValue(GLOBAL_NAMESPACE, XmiAttributeName.IDREF.getLocalName()); if (value != null) { return Identifier.fromString(value); } else { throw new XmiMissingAttributeException(XmiAttributeName.IDREF.getLocalName()); } } }
XmiReader { protected static final Identifier getIdRef(final XMLStreamReader reader) throws XmiMissingAttributeException { final String value = reader.getAttributeValue(GLOBAL_NAMESPACE, XmiAttributeName.IDREF.getLocalName()); if (value != null) { return Identifier.fromString(value); } else { throw new XmiMissingAttributeException(XmiAttributeName.IDREF.getLocalName()); } }  }
XmiReader { protected static final Identifier getIdRef(final XMLStreamReader reader) throws XmiMissingAttributeException { final String value = reader.getAttributeValue(GLOBAL_NAMESPACE, XmiAttributeName.IDREF.getLocalName()); if (value != null) { return Identifier.fromString(value); } else { throw new XmiMissingAttributeException(XmiAttributeName.IDREF.getLocalName()); } }  static final Model readModel(final File file); static final Model readModel(final InputStream stream); static final Model readModel(final String fileName); }
XmiReader { protected static final Identifier getIdRef(final XMLStreamReader reader) throws XmiMissingAttributeException { final String value = reader.getAttributeValue(GLOBAL_NAMESPACE, XmiAttributeName.IDREF.getLocalName()); if (value != null) { return Identifier.fromString(value); } else { throw new XmiMissingAttributeException(XmiAttributeName.IDREF.getLocalName()); } }  static final Model readModel(final File file); static final Model readModel(final InputStream stream); static final Model readModel(final String fileName);  }