@Test(expected = AssertionError.class) public void testGetOccursSadPath() { when(mockReader.getAttributeValue(any(String.class), any(String.class))).thenReturn("123"); XmiReader.getOccurs(mockReader, sampleAttribute); }
protected static final Occurs getOccurs(final XMLStreamReader reader, final XmiAttributeName name) { final int value = Integer.valueOf(reader.getAttributeValue(GLOBAL_NAMESPACE, name.getLocalName())); switch (value) { case 0: { return Occurs.ZERO; } case 1: { return Occurs.ONE; } case -1: { return Occurs.UNBOUNDED; } default: { throw new AssertionError(value); } } }
XmiReader { protected static final Occurs getOccurs(final XMLStreamReader reader, final XmiAttributeName name) { final int value = Integer.valueOf(reader.getAttributeValue(GLOBAL_NAMESPACE, name.getLocalName())); switch (value) { case 0: { return Occurs.ZERO; } case 1: { return Occurs.ONE; } case -1: { return Occurs.UNBOUNDED; } default: { throw new AssertionError(value); } } } }
XmiReader { protected static final Occurs getOccurs(final XMLStreamReader reader, final XmiAttributeName name) { final int value = Integer.valueOf(reader.getAttributeValue(GLOBAL_NAMESPACE, name.getLocalName())); switch (value) { case 0: { return Occurs.ZERO; } case 1: { return Occurs.ONE; } case -1: { return Occurs.UNBOUNDED; } default: { throw new AssertionError(value); } } }  }
XmiReader { protected static final Occurs getOccurs(final XMLStreamReader reader, final XmiAttributeName name) { final int value = Integer.valueOf(reader.getAttributeValue(GLOBAL_NAMESPACE, name.getLocalName())); switch (value) { case 0: { return Occurs.ZERO; } case 1: { return Occurs.ONE; } case -1: { return Occurs.UNBOUNDED; } default: { throw new AssertionError(value); } } }  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 Occurs getOccurs(final XMLStreamReader reader, final XmiAttributeName name) { final int value = Integer.valueOf(reader.getAttributeValue(GLOBAL_NAMESPACE, name.getLocalName())); switch (value) { case 0: { return Occurs.ZERO; } case 1: { return Occurs.ONE; } case -1: { return Occurs.UNBOUNDED; } default: { throw new AssertionError(value); } } }  static final Model readModel(final File file); static final Model readModel(final InputStream stream); static final Model readModel(final String fileName);  }