target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testCallback() throws Exception { when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(ODataServiceFactoryImpl.class.getName()); Response response = exceptionMapper.toResponse(new Exception()); assertNotNull(response); assertEquals(HttpStatusCodes.BAD_REQU... | @Override public Response toResponse(final Exception exception) { ODataResponse response; try { if (exception instanceof WebApplicationException) { response = handleWebApplicationException(exception); } else { response = handleException(exception); } } catch (Exception e) { response = ODataResponse.entity("Exception du... | ODataExceptionMapperImpl implements ExceptionMapper<Exception> { @Override public Response toResponse(final Exception exception) { ODataResponse response; try { if (exception instanceof WebApplicationException) { response = handleWebApplicationException(exception); } else { response = handleException(exception); } } ca... | ODataExceptionMapperImpl implements ExceptionMapper<Exception> { @Override public Response toResponse(final Exception exception) { ODataResponse response; try { if (exception instanceof WebApplicationException) { response = handleWebApplicationException(exception); } else { response = handleException(exception); } } ca... | ODataExceptionMapperImpl implements ExceptionMapper<Exception> { @Override public Response toResponse(final Exception exception) { ODataResponse response; try { if (exception instanceof WebApplicationException) { response = handleWebApplicationException(exception); } else { response = handleException(exception); } } ca... | ODataExceptionMapperImpl implements ExceptionMapper<Exception> { @Override public Response toResponse(final Exception exception) { ODataResponse response; try { if (exception instanceof WebApplicationException) { response = handleWebApplicationException(exception); } else { response = handleException(exception); } } ca... |
@Test public void testResourceBundleException() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "COMMON"); Message ms = MessageService.getMessage(null, context); assertEquals("MessageService could not be created because of exception 'IllegalArgumentException with messa... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void test() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "COMMON"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("Common exception", ms.getText()); } | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testParameter() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "ONE_REPLACEMENTS").addContent("first"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("Only replacement is [first]!", ms.getText()); } | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testOneParameterForTwo() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("Missing replacement for place holder in value 'First was... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testTwoParameters() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("First was [first] and second was [second]!", ms.get... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testRetrieveEntryResult() { JPAExpandCallBack callBack = getJPAExpandCallBackObject(); WriteEntryCallbackContext writeFeedContext = EdmMockUtil.getWriteEntryCallBackContext(); try { Field field = callBack.getClass().getDeclaredField("nextEntitySet"); field.setAccessible(true); field.set(callBack, EdmM... | @Override public WriteEntryCallbackResult retrieveEntryResult( final WriteEntryCallbackContext context) { WriteEntryCallbackResult result = new WriteEntryCallbackResult(); Map<String, Object> entry = context.getEntryData(); Map<String, Object> edmPropertyValueMap = null; List<EdmNavigationProperty> currentNavPropertyLi... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteEntryCallbackResult retrieveEntryResult( final WriteEntryCallbackContext context) { WriteEntryCallbackResult result = new WriteEntryCallbackResult(); Map<String, Object> entry = context.getEntryData(); Map<String... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteEntryCallbackResult retrieveEntryResult( final WriteEntryCallbackContext context) { WriteEntryCallbackResult result = new WriteEntryCallbackResult(); Map<String, Object> entry = context.getEntryData(); Map<String... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteEntryCallbackResult retrieveEntryResult( final WriteEntryCallbackContext context) { WriteEntryCallbackResult result = new WriteEntryCallbackResult(); Map<String, Object> entry = context.getEntryData(); Map<String... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteEntryCallbackResult retrieveEntryResult( final WriteEntryCallbackContext context) { WriteEntryCallbackResult result = new WriteEntryCallbackResult(); Map<String, Object> entry = context.getEntryData(); Map<String... |
@Test public void testTwoParametersWithTwoAddContent() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first").addContent("second"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("First was [first] and s... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testThreeParametersForTwo() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second", "third"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("First was [first] and second was [... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testThreeParametersPerAddContentForTwo() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS") .addContent("first").addContent("second").addContent("third"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testThreeParametersPerMixedForTwo() throws Exception { MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS") .addContent("first").addContent("second", "third"); Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context); assertEquals("First was [fir... | public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); } | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... | MessageService { public static Message getMessage(final Locale language, final MessageReference context) { Object[] contentAsArray = context.getContent().toArray(new Object[0]); return getMessage(language, context.getKey(), contentAsArray); } private MessageService(final Locale locale); static MessageService getInstan... |
@Test public void testCallbackPathInfoAvailable() throws Exception { ODataContextImpl context = getMockedContext("http: ODataErrorCallback errorCallback = new ODataErrorCallback() { @Override public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException { PathInfo pathInfo = context... | public ODataResponse wrapInExceptionResponse(final Exception exception) { try { final Exception toHandleException = extractException(exception); fillErrorContext(toHandleException); if (toHandleException instanceof ODataApplicationException) { enhanceContextWithApplicationException((ODataApplicationException) toHandleE... | ODataExceptionWrapper { public ODataResponse wrapInExceptionResponse(final Exception exception) { try { final Exception toHandleException = extractException(exception); fillErrorContext(toHandleException); if (toHandleException instanceof ODataApplicationException) { enhanceContextWithApplicationException((ODataApplica... | ODataExceptionWrapper { public ODataResponse wrapInExceptionResponse(final Exception exception) { try { final Exception toHandleException = extractException(exception); fillErrorContext(toHandleException); if (toHandleException instanceof ODataApplicationException) { enhanceContextWithApplicationException((ODataApplica... | ODataExceptionWrapper { public ODataResponse wrapInExceptionResponse(final Exception exception) { try { final Exception toHandleException = extractException(exception); fillErrorContext(toHandleException); if (toHandleException instanceof ODataApplicationException) { enhanceContextWithApplicationException((ODataApplica... | ODataExceptionWrapper { public ODataResponse wrapInExceptionResponse(final Exception exception) { try { final Exception toHandleException = extractException(exception); fillErrorContext(toHandleException); if (toHandleException instanceof ODataApplicationException) { enhanceContextWithApplicationException((ODataApplica... |
@Test public void test() throws IOException, BatchException, URISyntaxException { String fileName = "/batchWithPost.txt"; InputStream in = ClassLoader.class.getResourceAsStream(fileName); if (in == null) { throw new IOException("Requested file '" + fileName + "' was not found."); } BatchRequestParser parser = new Batch... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testImageInContent() throws IOException, BatchException, URISyntaxException { String fileName = "/batchWithContent.txt"; InputStream contentInputStream = ClassLoader.class.getResourceAsStream(fileName); if (contentInputStream == null) { throw new IOException("Requested file '" + fileName + "' was not ... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testPostWithoutBody() throws IOException, BatchException, URISyntaxException { String fileName = "/batchWithContent.txt"; InputStream contentInputStream = ClassLoader.class.getResourceAsStream(fileName); if (contentInputStream == null) { throw new IOException("Requested file '" + fileName + "' was not... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testBoundaryParameterWithQuotas() throws BatchException { String contentType = "multipart/mixed; boundary=\"batch_1.2+34:2j)0?\""; String batch = "--batch_1.2+34:2j)0?" + LF + GET_REQUEST + "--batch_1.2+34:2j)0?--"; InputStream in = new ByteArrayInputStream(batch.getBytes()); BatchRequestParser parser... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test(expected = BatchException.class) public void testBatchWithInvalidContentType() throws BatchException { String invalidContentType = "multipart;boundary=batch_1740-bb84-2f7f"; String batch = "--batch_1740-bb84-2f7f" + LF + GET_REQUEST + "--batch_1740-bb84-2f7f--"; InputStream in = new ByteArrayInputStream(batch.get... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testRetrieveFeedResult() { JPAExpandCallBack callBack = getJPAExpandCallBackObject(); WriteFeedCallbackContext writeFeedContext = EdmMockUtil.getWriteFeedCallBackContext(); try { Field field = callBack.getClass().getDeclaredField("nextEntitySet"); field.setAccessible(true); field.set(callBack, EdmMock... | @Override public WriteFeedCallbackResult retrieveFeedResult( final WriteFeedCallbackContext context) { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) context.getEntryData(); List<Map<String, Object>> edmEntityList = new ArrayList<Map<Stri... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteFeedCallbackResult retrieveFeedResult( final WriteFeedCallbackContext context) { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) co... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteFeedCallbackResult retrieveFeedResult( final WriteFeedCallbackContext context) { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) co... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteFeedCallbackResult retrieveFeedResult( final WriteFeedCallbackContext context) { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) co... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { @Override public WriteFeedCallbackResult retrieveFeedResult( final WriteFeedCallbackContext context) { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) co... |
@Test(expected = BatchException.class) public void testBatchWithoutBoundaryParameter() throws BatchException { String invalidContentType = "multipart/mixed"; String batch = "--batch_1740-bb84-2f7f" + LF + GET_REQUEST + "--batch_1740-bb84-2f7f--"; InputStream in = new ByteArrayInputStream(batch.getBytes()); BatchRequest... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test(expected = BatchException.class) public void testBoundaryParameterWithoutQuota() throws BatchException { String invalidContentType = "multipart;boundary=batch_1740-bb:84-2f7f"; String batch = "--batch_1740-bb:84-2f7f" + LF + GET_REQUEST + "--batch_1740-bb:84-2f7f--"; InputStream in = new ByteArrayInputStream(batc... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testAcceptHeaders() throws BatchException, URISyntaxException { String batch = "--batch_8194-cf13-1f56" + LF + MIME_HEADERS + LF + "GET Employees('2')/EmployeeName HTTP/1.1" + LF + "Content-Length: 100000" + LF + "Content-Type: application/json;odata=verbose" + LF + "Accept: application/xml;q=0.3, app... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testAcceptHeaders2() throws BatchException, URISyntaxException { String batch = "--batch_8194-cf13-1f56" + LF + MIME_HEADERS + LF + "GET Employees('2')/EmployeeName HTTP/1.1" + LF + "Content-Length: 100000" + LF + "Content-Type: application/json;odata=verbose" + LF + "Accept: **", retrieveRequest.getA... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testAcceptHeaders3() throws BatchException, URISyntaxException { String batch = "--batch_8194-cf13-1f56" + LF + MIME_HEADERS + LF + "GET Employees('2')/EmployeeName HTTP/1.1" + LF + "Content-Length: 100000" + LF + "Content-Type: application/json;odata=verbose" + LF + "accept: */*,application/atom+xml,... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testContentId() throws BatchException { String batch = "--batch_8194-cf13-1f56" + LF + MIME_HEADERS + LF + "GET Employees HTTP/1.1" + LF + "accept: */*,application/atom+xml,application/atomsvc+xml,application/xml" + LF + "Content-Id: BBB" + LF + LF + LF + "--batch_8194-cf13-1f56" + LF + "Content-Type:... | public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close(); try { in.close(); }... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... | BatchRequestParser { public List<BatchRequestPart> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); baseUri = getBaseUri(); List<BatchRequestPart> requestList; try { requestList = parseBatchRequest(scanner); } finally { scanner.close()... |
@Test public void testAcceptHeader() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("text/html,application/xhtml+xml,application/xml;q=0.9,**", acceptHeaders.get(3)); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testAcceptHeaderWithParameter() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application/json;odata=verbose;q=1.0, **", acceptHeaders.get(1)); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testAcceptHeaderWithParameterAndLws() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application/json; odata=verbose;q=1.0, **", acceptHeaders.get(1)); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testAcceptHeaderWithTabulator() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application/json;\todata=verbose;q=1.0, **", acceptHeaders.get(1)); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testGetCallbacks() { Map<String, ODataCallback> callBacks = null; try { URI baseUri = new URI("http: ExpandSelectTreeNode expandSelectTreeNode = EdmMockUtil.mockExpandSelectTreeNode(); List<ArrayList<NavigationPropertySegment>> expandList = EdmMockUtil.getExpandList(); callBacks = JPAExpandCallBack.ge... | public static <T> Map<String, ODataCallback> getCallbacks(final URI baseUri, final ExpandSelectTreeNode expandSelectTreeNode, final List<ArrayList<NavigationPropertySegment>> expandList) throws EdmException { Map<String, ODataCallback> callbacks = new HashMap<String, ODataCallback>(); for (String navigationPropertyName... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { public static <T> Map<String, ODataCallback> getCallbacks(final URI baseUri, final ExpandSelectTreeNode expandSelectTreeNode, final List<ArrayList<NavigationPropertySegment>> expandList) throws EdmException { Map<String, ODataCallback... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { public static <T> Map<String, ODataCallback> getCallbacks(final URI baseUri, final ExpandSelectTreeNode expandSelectTreeNode, final List<ArrayList<NavigationPropertySegment>> expandList) throws EdmException { Map<String, ODataCallback... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { public static <T> Map<String, ODataCallback> getCallbacks(final URI baseUri, final ExpandSelectTreeNode expandSelectTreeNode, final List<ArrayList<NavigationPropertySegment>> expandList) throws EdmException { Map<String, ODataCallback... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { public static <T> Map<String, ODataCallback> getCallbacks(final URI baseUri, final ExpandSelectTreeNode expandSelectTreeNode, final List<ArrayList<NavigationPropertySegment>> expandList) throws EdmException { Map<String, ODataCallback... |
@Test public void testAcceptHeaderWithTwoParameters() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application/xml;another=test ; param=alskdf, **", acceptHeaders.get(1)); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testAcceptHeader2() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("text/html;level=1, application*;q=0.1"); assertNotNull(acceptHeaders); assertEquals(3, acceptHeaders.size()); assertEquals("text/html;level=1", acceptHeaders.get(0)); assertEquals("application*", ... | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testMoreSpecificMediaType() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application/*, application/xml"); assertNotNull(acceptHeaders); assertEquals(2, acceptHeaders.size()); assertEquals("application/xml", acceptHeaders.get(0)); assertEquals("application/*", ... | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testQualityParameter() throws BatchException { List<String> acceptHeaders = AcceptParser.parseAcceptHeaders("application*; q=0.012"); assertNotNull(acceptHeaders); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test(expected = BatchException.class) public void testInvalidAcceptHeader() throws BatchException { AcceptParser.parseAcceptHeaders("appi cation*;q=0.1"); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test(expected = BatchException.class) public void testInvalidQualityParameter() throws BatchException { AcceptParser.parseAcceptHeaders("appication*;q=0,9"); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test(expected = BatchException.class) public void testInvalidQualityParameter2() throws BatchException { AcceptParser.parseAcceptHeaders("appication*;q=1.0001"); } | public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasNext()) { if (ac... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... | AcceptParser { public static List<String> parseAcceptHeaders(final String headerValue) throws BatchException { TreeSet<Accept> acceptTree = getAcceptTree(); List<String> acceptHeaders = new ArrayList<String>(); Scanner acceptHeaderScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptHeaderScanner.hasN... |
@Test public void testAcceptLanguages() throws BatchException { List<String> acceptLanguageHeaders = AcceptParser.parseAcceptableLanguages("en-US,en;q=0.7,en-UK;q=0.9"); assertNotNull(acceptLanguageHeaders); assertEquals(3, acceptLanguageHeaders.size()); assertEquals("en-US", acceptLanguageHeaders.get(0)); assertEquals... | public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguageScanner.hasNex... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... |
@Test public void testAllAcceptLanguages() throws BatchException { List<String> acceptLanguageHeaders = AcceptParser.parseAcceptableLanguages("*"); assertNotNull(acceptLanguageHeaders); assertEquals(1, acceptLanguageHeaders.size()); } | public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguageScanner.hasNex... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... |
@Test public void testLongAcceptLanguageValue() throws BatchException { List<String> acceptLanguageHeaders = AcceptParser.parseAcceptableLanguages("english"); assertNotNull(acceptLanguageHeaders); assertEquals("english", acceptLanguageHeaders.get(0)); } | public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguageScanner.hasNex... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... |
@Test public void testGetNextNavigationProperty() { JPAExpandCallBack callBack = getJPAExpandCallBackObject(); List<ArrayList<NavigationPropertySegment>> expandList = EdmMockUtil.getExpandList(); ArrayList<NavigationPropertySegment> expands = expandList.get(0); expands.add(EdmMockUtil.mockThirdNavigationPropertySegment... | private EdmNavigationProperty getNextNavigationProperty( final EdmEntityType sourceEntityType, final EdmNavigationProperty navigationProperty) throws EdmException { int count; for (ArrayList<NavigationPropertySegment> navPropSegments : expandList) { count = 0; for (NavigationPropertySegment navPropSegment : navPropSegm... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { private EdmNavigationProperty getNextNavigationProperty( final EdmEntityType sourceEntityType, final EdmNavigationProperty navigationProperty) throws EdmException { int count; for (ArrayList<NavigationPropertySegment> navPropSegments ... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { private EdmNavigationProperty getNextNavigationProperty( final EdmEntityType sourceEntityType, final EdmNavigationProperty navigationProperty) throws EdmException { int count; for (ArrayList<NavigationPropertySegment> navPropSegments ... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { private EdmNavigationProperty getNextNavigationProperty( final EdmEntityType sourceEntityType, final EdmNavigationProperty navigationProperty) throws EdmException { int count; for (ArrayList<NavigationPropertySegment> navPropSegments ... | JPAExpandCallBack implements OnWriteFeedContent, OnWriteEntryContent, ODataCallback { private EdmNavigationProperty getNextNavigationProperty( final EdmEntityType sourceEntityType, final EdmNavigationProperty navigationProperty) throws EdmException { int count; for (ArrayList<NavigationPropertySegment> navPropSegments ... |
@Test(expected = BatchException.class) public void testInvalidAcceptLanguageValue() throws BatchException { AcceptParser.parseAcceptableLanguages("en_US"); } | public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguageScanner.hasNex... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... | AcceptParser { public static List<String> parseAcceptableLanguages(final String headerValue) throws BatchException { List<String> acceptLanguages = new LinkedList<String>(); TreeSet<Accept> acceptTree = getAcceptTree(); Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?"); while (acceptLanguag... |
@Test public void testSimpleBatchResponse() throws BatchException { String getResponse = "--batch_123" + LF + "Content-Type: application/http" + LF + "Content-Transfer-Encoding: binary" + LF + "Content-ID: 1" + LF + LF + "HTTP/1.1 200 OK" + LF + "DataServiceVersion: 2.0" + LF + "Content-Type: text/plain;charset=utf-8" ... | public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally { scanner.close(); try ... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... |
@Test public void testBatchResponse() throws BatchException, IOException { String fileName = "/batchResponse.txt"; InputStream in = ClassLoader.class.getResourceAsStream(fileName); if (in == null) { throw new IOException("Requested file '" + fileName + "' was not found."); } BatchResponseParser parser = new BatchRespon... | public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally { scanner.close(); try ... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... |
@Test public void testResponseToChangeSet() throws BatchException { String putResponse = "--batch_123" + LF + "Content-Type: " + HttpContentType.MULTIPART_MIXED + ";boundary=changeset_12ks93js84d" + LF + LF + "--changeset_12ks93js84d" + LF + "Content-Type: application/http" + LF + "Content-Transfer-Encoding: binary" + ... | public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally { scanner.close(); try ... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... | BatchResponseParser { public List<BatchSingleResponse> parse(final InputStream in) throws BatchException { Scanner scanner = new Scanner(in, BatchHelper.DEFAULT_ENCODING).useDelimiter(LF); List<BatchSingleResponse> responseList; try { responseList = Collections.unmodifiableList(parseBatchResponse(scanner)); } finally {... |
@Test public void testBatchQueryPart() throws BatchException, IOException { List<BatchPart> batch = new ArrayList<BatchPart>(); Map<String, String> headers = new HashMap<String, String>(); headers.put("Accept", "application/json"); BatchPart request = BatchQueryPart.method(GET).uri("Employees").headers(headers).build()... | public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if (batchPart instanceof... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... |
@Test public void testBatchChangeSet() throws IOException, BatchException { List<BatchPart> batch = new ArrayList<BatchPart>(); Map<String, String> headers = new HashMap<String, String>(); headers.put("content-type", "application/json"); BatchChangeSetPart request = BatchChangeSetPart.method(PUT) .uri("Employees('2')")... | public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if (batchPart instanceof... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... |
@Test public void testBatchWithGetAndPost() throws BatchException, IOException { List<BatchPart> batch = new ArrayList<BatchPart>(); Map<String, String> headers = new HashMap<String, String>(); headers.put("Accept", "application/json"); BatchPart request = BatchQueryPart.method(GET).uri("Employees").headers(headers).co... | public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if (batchPart instanceof... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... |
@Test public void testChangeSetWithContentIdReferencing() throws BatchException, IOException { List<BatchPart> batch = new ArrayList<BatchPart>(); Map<String, String> changeSetHeaders = new HashMap<String, String>(); changeSetHeaders.put("content-type", "application/json"); String body = "/9j/4AAQSkZJRgABAQEBLAEsAAD/4R... | public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if (batchPart instanceof... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... |
@Test public void testBatchWithTwoChangeSets() throws BatchException, IOException { List<BatchPart> batch = new ArrayList<BatchPart>(); Map<String, String> changeSetHeaders = new HashMap<String, String>(); changeSetHeaders.put("content-type", "application/json"); changeSetHeaders.put("content-Id", "111"); String body =... | public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if (batchPart instanceof... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... | BatchRequestWriter { public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) { if (boundary.matches(REG_EX_BOUNDARY)) { batchBoundary = boundary; } else { throw new IllegalArgumentException(); } for (BatchPart batchPart : batchParts) { writer.append("--" + boundary).append(LF); if ... |
@Test public void testBatchResponse() throws BatchException, IOException { List<BatchResponsePart> parts = new ArrayList<BatchResponsePart>(); ODataResponse response = ODataResponse.entity("Walter Winter") .status(HttpStatusCodes.OK) .contentHeader("application/json") .build(); List<ODataResponse> responses = new Array... | public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchResponseBody).status(Http... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... |
@SuppressWarnings("rawtypes") @Test public void testBuildJPAEdmComplexPropertyViewJPAEdmPropertyView() { JPAEdmComplexPropertyView complexPropertyView = EasyMock.createMock(JPAEdmComplexPropertyView.class); ComplexProperty complexProperty = new ComplexProperty(); EasyMock.expect(complexPropertyView.getEdmComplexPropert... | public static FullQualifiedName build(final JPAEdmBaseView view, final String name) { FullQualifiedName fqName = new FullQualifiedName(buildNamespace(view), name); return fqName; } | JPAEdmNameBuilder { public static FullQualifiedName build(final JPAEdmBaseView view, final String name) { FullQualifiedName fqName = new FullQualifiedName(buildNamespace(view), name); return fqName; } } | JPAEdmNameBuilder { public static FullQualifiedName build(final JPAEdmBaseView view, final String name) { FullQualifiedName fqName = new FullQualifiedName(buildNamespace(view), name); return fqName; } } | JPAEdmNameBuilder { public static FullQualifiedName build(final JPAEdmBaseView view, final String name) { FullQualifiedName fqName = new FullQualifiedName(buildNamespace(view), name); return fqName; } static FullQualifiedName build(final JPAEdmBaseView view, final String name); static void build(final JPAEdmEntityType... | JPAEdmNameBuilder { public static FullQualifiedName build(final JPAEdmBaseView view, final String name) { FullQualifiedName fqName = new FullQualifiedName(buildNamespace(view), name); return fqName; } static FullQualifiedName build(final JPAEdmBaseView view, final String name); static void build(final JPAEdmEntityType... |
@Test public void testResponse() throws BatchException, IOException { List<BatchResponsePart> parts = new ArrayList<BatchResponsePart>(); ODataResponse response = ODataResponse.entity("Walter Winter").status(HttpStatusCodes.OK).contentHeader("application/json").build(); List<ODataResponse> responses = new ArrayList<ODa... | public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchResponseBody).status(Http... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... |
@Test public void testChangeSetResponse() throws BatchException, IOException { List<BatchResponsePart> parts = new ArrayList<BatchResponsePart>(); ODataResponse changeSetResponse = ODataResponse.status(HttpStatusCodes.NO_CONTENT).build(); List<ODataResponse> responses = new ArrayList<ODataResponse>(1); responses.add(ch... | public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchResponseBody).status(Http... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... |
@Test public void testContentIdEchoing() throws BatchException, IOException { List<BatchResponsePart> parts = new ArrayList<BatchResponsePart>(); ODataResponse response = ODataResponse.entity("Walter Winter") .status(HttpStatusCodes.OK) .contentHeader("application/json") .header(BatchHelper.MIME_HEADER_CONTENT_ID, "mim... | public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchResponseBody).status(Http... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... | BatchResponseWriter { public ODataResponse writeResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException { String boundary = BatchHelper.generateBoundary("batch"); appendResponsePart(batchResponseParts, boundary); String batchResponseBody = writer.toString(); return ODataResponse.entity(batchRes... |
@Test public void testAttributes() { List<? extends EdmAnnotationAttribute> annotations = annotationsProvider.getAnnotationAttributes(); assertEquals(1, annotations.size()); Iterator<? extends EdmAnnotationAttribute> iterator = annotations.iterator(); while (iterator.hasNext()) { EdmAnnotationAttribute attribute = iter... | @Override public List<? extends EdmAnnotationAttribute> getAnnotationAttributes() { return annotationAttributes; } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationAttribute> getAnnotationAttributes() { return annotationAttributes; } } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationAttribute> getAnnotationAttributes() { return annotationAttributes; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationAttribute> getAnnotationAttributes() { return annotationAttributes; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); @Override List<? extends E... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationAttribute> getAnnotationAttributes() { return annotationAttributes; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); @Override List<? extends E... |
@Test public void testAttribute() { EdmAnnotationAttribute attribute = annotationsProvider.getAnnotationAttribute("attributeName", "namespace"); assertEquals("attributeName", attribute.getName()); assertEquals("namespace", attribute.getNamespace()); assertEquals("prefix", attribute.getPrefix()); assertEquals("Text", at... | @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAttributesIterator.hasNext()) { EdmAnnotationAttribute... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... |
@Test public void testAttributeNull() { EdmAnnotationAttribute attribute = annotationsProvider.getAnnotationAttribute("attributeNameWrong", "namespaceWrong"); assertNull(attribute); } | @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAttributesIterator.hasNext()) { EdmAnnotationAttribute... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationAttribute getAnnotationAttribute(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationAttribute> annotationAttributesIterator = annotationAttributes.iterator(); while (annotationAtt... |
@Test public void testElements() { List<? extends EdmAnnotationElement> annotations = annotationsProvider.getAnnotationElements(); assertEquals(1, annotations.size()); Iterator<? extends EdmAnnotationElement> iterator = annotations.iterator(); while (iterator.hasNext()) { EdmAnnotationElement element = iterator.next();... | @Override public List<? extends EdmAnnotationElement> getAnnotationElements() { return annotationElements; } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationElement> getAnnotationElements() { return annotationElements; } } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationElement> getAnnotationElements() { return annotationElements; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); } | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationElement> getAnnotationElements() { return annotationElements; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); @Override List<? extends EdmAnno... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public List<? extends EdmAnnotationElement> getAnnotationElements() { return annotationElements; } EdmAnnotationsImplProv(final List<AnnotationAttribute> annotationAttributes, final List<AnnotationElement> annotationElements); @Override List<? extends EdmAnno... |
@Test public void testElement() { EdmAnnotationElement element = annotationsProvider.getAnnotationElement("elementName", "namespace"); assertEquals("elementName", element.getName()); assertEquals("namespace", element.getNamespace()); assertEquals("prefix", element.getPrefix()); assertEquals("xmlData", element.getText()... | @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterator.hasNext()) { EdmAnnotationElement annotationEleme... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... |
@Test public void testElementNull() { EdmAnnotationElement element = annotationsProvider.getAnnotationElement("elementNameWrong", "namespaceWrong"); assertNull(element); } | @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterator.hasNext()) { EdmAnnotationElement annotationEleme... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... | EdmAnnotationsImplProv implements EdmAnnotations { @Override public EdmAnnotationElement getAnnotationElement(final String name, final String namespace) { if (annotationElements != null) { Iterator<? extends EdmAnnotationElement> annotationElementIterator = annotationElements.iterator(); while (annotationElementIterato... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = propertySimpleProvider; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(property.getAnnotationAttributes(), property.getAnnotationElements()); } | EdmPropertyImplProv extends EdmElementImplProv implements EdmProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(property.getAnnotationAttributes(), property.getAnnotationElements()); } } | EdmPropertyImplProv extends EdmElementImplProv implements EdmProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(property.getAnnotationAttributes(), property.getAnnotationElements()); } EdmPropertyImplProv(final EdmImplProv edm, final FullQ... | EdmPropertyImplProv extends EdmElementImplProv implements EdmProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(property.getAnnotationAttributes(), property.getAnnotationElements()); } EdmPropertyImplProv(final EdmImplProv edm, final FullQ... | EdmPropertyImplProv extends EdmElementImplProv implements EdmProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(property.getAnnotationAttributes(), property.getAnnotationElements()); } EdmPropertyImplProv(final EdmImplProv edm, final FullQ... |
@Test public void testConvertToEdmSimpleType() { String str = "entity"; byte[] byteArr = new byte[3]; Long longObj = new Long(0); Short shortObj = new Short((short) 0); Integer integerObj = new Integer(0); Double doubleObj = new Double(0); Float floatObj = new Float(0); BigDecimal bigDecimalObj = new BigDecimal(0); Byt... | public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int6... | JPATypeConvertor { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return Edm... | JPATypeConvertor { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return Edm... | JPATypeConvertor { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return Edm... | JPATypeConvertor { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return Edm... |
@Test public void getBaseType() throws Exception { EdmComplexType baseType = edmComplexTypeWithBaseType.getBaseType(); assertNotNull(baseType); assertEquals("barBase", baseType.getName()); assertEquals("namespace", baseType.getNamespace()); } | @Override public EdmComplexType getBaseType() throws EdmException { return (EdmComplexType) edmBaseType; } | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmComplexType getBaseType() throws EdmException { return (EdmComplexType) edmBaseType; } } | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmComplexType getBaseType() throws EdmException { return (EdmComplexType) edmBaseType; } EdmComplexTypeImplProv(final EdmImplProv edm, final ComplexType complexType, final String namespace); } | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmComplexType getBaseType() throws EdmException { return (EdmComplexType) edmBaseType; } EdmComplexTypeImplProv(final EdmImplProv edm, final ComplexType complexType, final String namespace); @Override EdmComplexType g... | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmComplexType getBaseType() throws EdmException { return (EdmComplexType) edmBaseType; } EdmComplexTypeImplProv(final EdmImplProv edm, final ComplexType complexType, final String namespace); @Override EdmComplexType g... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = edmComplexType; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(structuralType.getAnnotationAttributes(), structuralType.getAnnotationElements()); } | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(structuralType.getAnnotationAttributes(), structuralType.getAnnotationElements()); } } | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(structuralType.getAnnotationAttributes(), structuralType.getAnnotationElements()); } EdmComplexTypeImplProv(final EdmImplProv edm,... | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(structuralType.getAnnotationAttributes(), structuralType.getAnnotationElements()); } EdmComplexTypeImplProv(final EdmImplProv edm,... | EdmComplexTypeImplProv extends EdmStructuralTypeImplProv implements EdmComplexType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(structuralType.getAnnotationAttributes(), structuralType.getAnnotationElements()); } EdmComplexTypeImplProv(final EdmImplProv edm,... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = (EdmAnnotatable) edmAssociationSetEnd; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(end.getAnnotationAttributes(), end.getAnnotationElements()); } | EdmAssociationSetEndImplProv implements EdmAssociationSetEnd, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(end.getAnnotationAttributes(), end.getAnnotationElements()); } } | EdmAssociationSetEndImplProv implements EdmAssociationSetEnd, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(end.getAnnotationAttributes(), end.getAnnotationElements()); } EdmAssociationSetEndImplProv(final AssociationSetEnd end, final EdmEntity... | EdmAssociationSetEndImplProv implements EdmAssociationSetEnd, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(end.getAnnotationAttributes(), end.getAnnotationElements()); } EdmAssociationSetEndImplProv(final AssociationSetEnd end, final EdmEntity... | EdmAssociationSetEndImplProv implements EdmAssociationSetEnd, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(end.getAnnotationAttributes(), end.getAnnotationElements()); } EdmAssociationSetEndImplProv(final AssociationSetEnd end, final EdmEntity... |
@Test public void getEntitySetInfosForEmptyEdmProvider() throws Exception { EdmProvider edmProvider = mock(EdmProvider.class); EdmServiceMetadata serviceMetadata = new EdmServiceMetadataImplProv(edmProvider); List<EdmEntitySetInfo> infos = serviceMetadata.getEntitySetInfos(); assertNotNull(infos); assertEquals(Collecti... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void getEntitySetInfosForEmptyEdmProviderSchemas() throws Exception { List<Schema> schemas = new ArrayList<Schema>(); EdmProvider edmProvider = mock(EdmProvider.class); when(edmProvider.getSchemas()).thenReturn(schemas); EdmServiceMetadata serviceMetadata = new EdmServiceMetadataImplProv(edmProvider); List... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void oneEntitySetOneContainerForInfo() throws Exception { String entitySetUriString = new URI("Employees").toASCIIString(); List<EntitySet> entitySets = new ArrayList<EntitySet>(); EntitySet entitySet = new EntitySet().setName("Employees"); entitySets.add(entitySet); List<EntityContainer> entityContainers ... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void twoEntitySetsOneContainerForInfo() throws Exception { List<EntitySet> entitySets = new ArrayList<EntitySet>(); EntitySet entitySet = new EntitySet().setName("Employees"); entitySets.add(entitySet); entitySets.add(entitySet); List<EntityContainer> entityContainers = new ArrayList<EntityContainer>(); En... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void twoContainersWithOneEntitySetEachForInfo() throws Exception { String entitySetUriString = new URI("Employees").toASCIIString(); String entitySetUriString2 = new URI("Container2.Employees").toASCIIString(); List<EntitySet> entitySets = new ArrayList<EntitySet>(); EntitySet entitySet = new EntitySet().s... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void oneEntitySetsOneContainerTwoSchemadForInfo() throws Exception { List<EntitySet> entitySets = new ArrayList<EntitySet>(); EntitySet entitySet = new EntitySet().setName("Employees"); entitySets.add(entitySet); List<EntityContainer> entityContainers = new ArrayList<EntityContainer>(); EntityContainer con... | @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContai... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException { if (entitySetInfos == null) { entitySetInfos = new ArrayList<EdmEntitySetInfo>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { fo... |
@Test public void dataServiceVersion() throws Exception { EdmProvider edmProvider = mock(EdmProvider.class); EdmImplProv edmImplProv = new EdmImplProv(edmProvider); EdmServiceMetadata serviceMetadata = edmImplProv.getServiceMetadata(); assertEquals("1.0", serviceMetadata.getDataServiceVersion()); } | @Override public String getDataServiceVersion() throws ODataException { if (schemas == null) { schemas = edmProvider.getSchemas(); } if (dataServiceVersion == null) { dataServiceVersion = ODataServiceVersion.V10; if (schemas != null) { for (Schema schema : schemas) { List<EntityType> entityTypes = schema.getEntityTypes... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public String getDataServiceVersion() throws ODataException { if (schemas == null) { schemas = edmProvider.getSchemas(); } if (dataServiceVersion == null) { dataServiceVersion = ODataServiceVersion.V10; if (schemas != null) { for (Schema schema : sche... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public String getDataServiceVersion() throws ODataException { if (schemas == null) { schemas = edmProvider.getSchemas(); } if (dataServiceVersion == null) { dataServiceVersion = ODataServiceVersion.V10; if (schemas != null) { for (Schema schema : sche... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public String getDataServiceVersion() throws ODataException { if (schemas == null) { schemas = edmProvider.getSchemas(); } if (dataServiceVersion == null) { dataServiceVersion = ODataServiceVersion.V10; if (schemas != null) { for (Schema schema : sche... | EdmServiceMetadataImplProv implements EdmServiceMetadata { @Override public String getDataServiceVersion() throws ODataException { if (schemas == null) { schemas = edmProvider.getSchemas(); } if (dataServiceVersion == null) { dataServiceVersion = ODataServiceVersion.V10; if (schemas != null) { for (Schema schema : sche... |
@Test public void testLoadMappingModel() { VARIANT_MAPPING_FILE = 1; loadMappingModel(); assertTrue(isMappingModelExists()); } | @Override public void loadMappingModel() { if (mappingModelExists) { JAXBContext context; try { context = JAXBContext.newInstance(JPAEdmMappingModel.class); Unmarshaller unmarshaller = context.createUnmarshaller(); InputStream is = loadMappingModelInputStream(); if (is == null) { mappingModelExists = false; return; } m... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public void loadMappingModel() { if (mappingModelExists) { JAXBContext context; try { context = JAXBContext.newInstance(JPAEdmMappingModel.class); Unmarshaller unmarshaller = context.createUnmarshaller(); InputStream is = loadMappingModelInputStr... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public void loadMappingModel() { if (mappingModelExists) { JAXBContext context; try { context = JAXBContext.newInstance(JPAEdmMappingModel.class); Unmarshaller unmarshaller = context.createUnmarshaller(); InputStream is = loadMappingModelInputStr... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public void loadMappingModel() { if (mappingModelExists) { JAXBContext context; try { context = JAXBContext.newInstance(JPAEdmMappingModel.class); Unmarshaller unmarshaller = context.createUnmarshaller(); InputStream is = loadMappingModelInputStr... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public void loadMappingModel() { if (mappingModelExists) { JAXBContext context; try { context = JAXBContext.newInstance(JPAEdmMappingModel.class); Unmarshaller unmarshaller = context.createUnmarshaller(); InputStream is = loadMappingModelInputStr... |
@Test public void getKeyProperties() throws Exception { List<EdmProperty> keyProperties = edmEntityType.getKeyProperties(); assertNotNull(keyProperties); assertEquals("Id", keyProperties.get(0).getName()); } | @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... |
@Test public void getKeyPropertiesNames() throws Exception { List<String> keyProperties = edmEntityType.getKeyPropertyNames(); assertNotNull(keyProperties); assertTrue(keyProperties.contains("Id")); List<String> properties = edmEntityType.getPropertyNames(); assertNotNull(properties); assertTrue(properties.contains("Id... | @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : ent... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... |
@Test public void getNavProperties() throws Exception { List<String> navProperties = edmEntityType.getNavigationPropertyNames(); assertNotNull(navProperties); assertTrue(navProperties.contains("fooBarNav")); } | @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll(((EdmEntityType) edmBaseType).getNavigationPropertyNames()); } if (entityType.getN... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... |
@Test public void getKeyPropertiesWithBaseType() throws Exception { List<EdmProperty> keyProperties = edmEntityTypeWithBaseType.getKeyProperties(); assertNotNull(keyProperties); assertEquals("Id", keyProperties.get(0).getName()); } | @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties ... |
@Test public void getKeyPropertiesNamesWithBaseType() throws Exception { List<String> keyProperties = edmEntityTypeWithBaseType.getKeyPropertyNames(); assertNotNull(keyProperties); assertTrue(keyProperties.contains("Id")); } | @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : ent... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<Str... |
@Test public void getNavPropertiesWithBaseType() throws Exception { List<String> navProperties = edmEntityTypeWithBaseType.getNavigationPropertyNames(); assertNotNull(navProperties); assertTrue(navProperties.contains("barBaseNav")); } | @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll(((EdmEntityType) edmBaseType).getNavigationPropertyNames()); } if (entityType.getN... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getNavigationPropertyNames() throws EdmException { if (edmNavigationPropertyNames == null) { edmNavigationPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmNavigationPropertyNames.addAll... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = edmEntityType; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityType.getAnnotationAttributes(), entityType.getAnnotationElements()); } | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityType.getAnnotationAttributes(), entityType.getAnnotationElements()); } } | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityType.getAnnotationAttributes(), entityType.getAnnotationElements()); } EdmEntityTypeImplProv(final EdmImplProv edm, final Enti... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityType.getAnnotationAttributes(), entityType.getAnnotationElements()); } EdmEntityTypeImplProv(final EdmImplProv edm, final Enti... | EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityType.getAnnotationAttributes(), entityType.getAnnotationElements()); } EdmEntityTypeImplProv(final EdmImplProv edm, final Enti... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = navPropertyProvider; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(navigationProperty.getAnnotationAttributes(), navigationProperty.getAnnotationElements()); } | EdmNavigationPropertyImplProv extends EdmTypedImplProv implements EdmNavigationProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(navigationProperty.getAnnotationAttributes(), navigationProperty.getAnnotationElements()); } } | EdmNavigationPropertyImplProv extends EdmTypedImplProv implements EdmNavigationProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(navigationProperty.getAnnotationAttributes(), navigationProperty.getAnnotationElements()); } EdmNavigationPro... | EdmNavigationPropertyImplProv extends EdmTypedImplProv implements EdmNavigationProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(navigationProperty.getAnnotationAttributes(), navigationProperty.getAnnotationElements()); } EdmNavigationPro... | EdmNavigationPropertyImplProv extends EdmTypedImplProv implements EdmNavigationProperty, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(navigationProperty.getAnnotationAttributes(), navigationProperty.getAnnotationElements()); } EdmNavigationPro... |
@Test public void testAssociationSet() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; assertEquals("associationSetName", associationSet.getName()); assertEquals("end1Role", associationSet.getEnd("end1Role").getRole()); assertEquals(null, associationSet.getEnd("endWrongRole")); } | @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEnt... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... |
@Test(expected = EdmException.class) public void testAssociationSetNoEntity() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; associationSet.getEnd("end2Role"); } | @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEnt... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.... |
@Test public void testIsMappingModelExists() { assertTrue(objJPAEdmMappingModelServiceTest.isMappingModelExists()); } | @Override public boolean isMappingModelExists() { return mappingModelExists; } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public boolean isMappingModelExists() { return mappingModelExists; } } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public boolean isMappingModelExists() { return mappingModelExists; } JPAEdmMappingModelService(final ODataJPAContext ctx); } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public boolean isMappingModelExists() { return mappingModelExists; } JPAEdmMappingModelService(final ODataJPAContext ctx); @Override void loadMappingModel(); @Override boolean isMappingModelExists(); @Override JPAEdmMappingModel getJPAEdmMappingM... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public boolean isMappingModelExists() { return mappingModelExists; } JPAEdmMappingModelService(final ODataJPAContext ctx); @Override void loadMappingModel(); @Override boolean isMappingModelExists(); @Override JPAEdmMappingModel getJPAEdmMappingM... |
@Test public void testIsScrumTeam() { Team team1 = new Team(1, null); team1.setScrumTeam(true); assertTrue(team1.isScrumTeam()); } | public boolean isScrumTeam() { return isScrumTeam; } | Team { public boolean isScrumTeam() { return isScrumTeam; } } | Team { public boolean isScrumTeam() { return isScrumTeam; } Team(final int id, final String name); } | Team { public boolean isScrumTeam() { return isScrumTeam; } Team(final int id, final String name); String getId(); String getName(); void setName(final String name); boolean isScrumTeam(); void setScrumTeam(final boolean isScrumTeam); List<Employee> getEmployees(); @Override int hashCode(); @Override boolean equals(fin... | Team { public boolean isScrumTeam() { return isScrumTeam; } Team(final int id, final String name); String getId(); String getName(); void setName(final String name); boolean isScrumTeam(); void setScrumTeam(final boolean isScrumTeam); List<Employee> getEmployees(); @Override int hashCode(); @Override boolean equals(fin... |
@Test public void testAssociationExists() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; assertNotNull(associationSet.getAssociation()); } | @Override public EdmAssociation getAssociation() throws EdmException { EdmAssociation association = edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName()); if (association == null) { throw new EdmException(EdmException.COMMON); } return association; } | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociation getAssociation() throws EdmException { EdmAssociation association = edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName()); if (associa... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociation getAssociation() throws EdmException { EdmAssociation association = edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName()); if (associa... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociation getAssociation() throws EdmException { EdmAssociation association = edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName()); if (associa... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociation getAssociation() throws EdmException { EdmAssociation association = edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName()); if (associa... |
@Test public void testEntityContainer() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; assertNotNull(associationSet.getEntityContainer()); } | @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } } | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet, final EdmEntityContainer edm... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet, final EdmEntityContainer edm... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet, final EdmEntityContainer edm... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = (EdmAnnotatable) edmAssociationSet; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(associationSet.getAnnotationAttributes(), associationSet.getAnnotationElements()); } | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(associationSet.getAnnotationAttributes(), associationSet.getAnnotationElements()); } } | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(associationSet.getAnnotationAttributes(), associationSet.getAnnotationElements()); } EdmAssociationSetImplProv(final ... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(associationSet.getAnnotationAttributes(), associationSet.getAnnotationElements()); } EdmAssociationSetImplProv(final ... | EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(associationSet.getAnnotationAttributes(), associationSet.getAnnotationElements()); } EdmAssociationSetImplProv(final ... |
@Test public void functionImport() throws Exception { assertEquals("foo", edmFunctionImport.getName()); assertEquals(HttpMethods.GET, edmFunctionImport.getHttpMethod()); } | @Override public String getHttpMethod() throws EdmException { return functionImport.getHttpMethod(); } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public String getHttpMethod() throws EdmException { return functionImport.getHttpMethod(); } } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public String getHttpMethod() throws EdmException { return functionImport.getHttpMethod(); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edmEntit... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public String getHttpMethod() throws EdmException { return functionImport.getHttpMethod(); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edmEntit... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public String getHttpMethod() throws EdmException { return functionImport.getHttpMethod(); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edmEntit... |
@Test public void containerName() throws Exception { assertEquals(edmEntityContainer, edmFunctionImport.getEntityContainer()); } | @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edm... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edm... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntityContainer getEntityContainer() throws EdmException { return edmEntityContainer; } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImport, final EdmEntityContainer edm... |
@Test public void returnType() throws Exception { EdmTyped returnType = edmFunctionImport.getReturnType(); assertNotNull(returnType); assertEquals(EdmSimpleTypeKind.String.getFullQualifiedName().getName(), returnType.getType().getName()); assertEquals(EdmMultiplicity.ONE, returnType.getMultiplicity()); } | @Override public EdmTyped getReturnType() throws EdmException { final ReturnType returnType = functionImport.getReturnType(); return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.getMultiplicity()); } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmTyped getReturnType() throws EdmException { final ReturnType returnType = functionImport.getReturnType(); return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmTyped getReturnType() throws EdmException { final ReturnType returnType = functionImport.getReturnType(); return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmTyped getReturnType() throws EdmException { final ReturnType returnType = functionImport.getReturnType(); return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmTyped getReturnType() throws EdmException { final ReturnType returnType = functionImport.getReturnType(); return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.... |
@Test public void entitySet() throws Exception { EdmEntitySet entitySet = edmFunctionImport.getEntitySet(); assertNotNull(entitySet); assertEquals("fooEntitySet", entitySet.getName()); assertEquals(edmEntityContainer.getEntitySet("fooEntitySet"), entitySet); } | @Override public EdmEntitySet getEntitySet() throws EdmException { return edmEntityContainer.getEntitySet(functionImport.getEntitySet()); } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntitySet getEntitySet() throws EdmException { return edmEntityContainer.getEntitySet(functionImport.getEntitySet()); } } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntitySet getEntitySet() throws EdmException { return edmEntityContainer.getEntitySet(functionImport.getEntitySet()); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImpo... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntitySet getEntitySet() throws EdmException { return edmEntityContainer.getEntitySet(functionImport.getEntitySet()); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImpo... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmEntitySet getEntitySet() throws EdmException { return edmEntityContainer.getEntitySet(functionImport.getEntitySet()); } EdmFunctionImportImplProv(final EdmImplProv edm, final FunctionImport functionImpo... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = edmFunctionImport; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(functionImport.getAnnotationAttributes(), functionImport.getAnnotationElements()); } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(functionImport.getAnnotationAttributes(), functionImport.getAnnotationElements()); } } | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(functionImport.getAnnotationAttributes(), functionImport.getAnnotationElements()); } EdmFunctionImportImplProv(final ... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(functionImport.getAnnotationAttributes(), functionImport.getAnnotationElements()); } EdmFunctionImportImplProv(final ... | EdmFunctionImportImplProv extends EdmNamedImplProv implements EdmFunctionImport, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(functionImport.getAnnotationAttributes(), functionImport.getAnnotationElements()); } EdmFunctionImportImplProv(final ... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = associationProv; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(association.getAnnotationAttributes(), association.getAnnotationElements()); } | EdmAssociationImplProv extends EdmNamedImplProv implements EdmAssociation, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(association.getAnnotationAttributes(), association.getAnnotationElements()); } } | EdmAssociationImplProv extends EdmNamedImplProv implements EdmAssociation, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(association.getAnnotationAttributes(), association.getAnnotationElements()); } EdmAssociationImplProv(final EdmImplProv edm... | EdmAssociationImplProv extends EdmNamedImplProv implements EdmAssociation, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(association.getAnnotationAttributes(), association.getAnnotationElements()); } EdmAssociationImplProv(final EdmImplProv edm... | EdmAssociationImplProv extends EdmNamedImplProv implements EdmAssociation, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(association.getAnnotationAttributes(), association.getAnnotationElements()); } EdmAssociationImplProv(final EdmImplProv edm... |
@Test public void testEntityContainerName() throws EdmException { assertEquals("Container1", edmEntityContainer.getName()); } | @Override public String getName() throws EdmException { return entityContainer.getName(); } | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public String getName() throws EdmException { return entityContainer.getName(); } } | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public String getName() throws EdmException { return entityContainer.getName(); } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainer); } | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public String getName() throws EdmException { return entityContainer.getName(); } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainer); @Override String getName(); @Override EdmEntitySet getEntit... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public String getName() throws EdmException { return entityContainer.getName(); } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainer); @Override String getName(); @Override EdmEntitySet getEntit... |
@Test public void testGetJPAEdmMappingModel() { assertNotNull(objJPAEdmMappingModelServiceTest.getJPAEdmMappingModel()); } | @Override public JPAEdmMappingModel getJPAEdmMappingModel() { return mappingModel; } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public JPAEdmMappingModel getJPAEdmMappingModel() { return mappingModel; } } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public JPAEdmMappingModel getJPAEdmMappingModel() { return mappingModel; } JPAEdmMappingModelService(final ODataJPAContext ctx); } | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public JPAEdmMappingModel getJPAEdmMappingModel() { return mappingModel; } JPAEdmMappingModelService(final ODataJPAContext ctx); @Override void loadMappingModel(); @Override boolean isMappingModelExists(); @Override JPAEdmMappingModel getJPAEdmMa... | JPAEdmMappingModelService implements JPAEdmMappingModelAccess { @Override public JPAEdmMappingModel getJPAEdmMappingModel() { return mappingModel; } JPAEdmMappingModelService(final ODataJPAContext ctx); @Override void loadMappingModel(); @Override boolean isMappingModelExists(); @Override JPAEdmMappingModel getJPAEdmMa... |
@Test public void testEntitySetCache() throws EdmException { assertEquals(edmEntityContainer.getEntitySet("foo"), edmEntityContainer.getEntitySet("foo")); assertNotSame(edmEntityContainer.getEntitySet("foo"), edmEntityContainer.getEntitySet("bar")); } | @Override public EdmEntitySet getEntitySet(final String name) throws EdmException { EdmEntitySet edmEntitySet = edmEntitySets.get(name); if (edmEntitySet != null) { return edmEntitySet; } EntitySet entitySet; try { entitySet = edm.edmProvider.getEntitySet(entityContainer.getName(), name); } catch (ODataException e) { t... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmEntitySet getEntitySet(final String name) throws EdmException { EdmEntitySet edmEntitySet = edmEntitySets.get(name); if (edmEntitySet != null) { return edmEntitySet; } EntitySet entitySet; try { entitySet = edm.edmProvider.ge... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmEntitySet getEntitySet(final String name) throws EdmException { EdmEntitySet edmEntitySet = edmEntitySets.get(name); if (edmEntitySet != null) { return edmEntitySet; } EntitySet entitySet; try { entitySet = edm.edmProvider.ge... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmEntitySet getEntitySet(final String name) throws EdmException { EdmEntitySet edmEntitySet = edmEntitySets.get(name); if (edmEntitySet != null) { return edmEntitySet; } EntitySet entitySet; try { entitySet = edm.edmProvider.ge... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmEntitySet getEntitySet(final String name) throws EdmException { EdmEntitySet edmEntitySet = edmEntitySets.get(name); if (edmEntitySet != null) { return edmEntitySet; } EntitySet entitySet; try { entitySet = edm.edmProvider.ge... |
@Test public void testFunctionImportCache() throws EdmException { assertEquals(edmEntityContainer.getFunctionImport("foo"), edmEntityContainer.getFunctionImport("foo")); assertNotSame(edmEntityContainer.getFunctionImport("foo"), edmEntityContainer.getFunctionImport("bar")); } | @Override public EdmFunctionImport getFunctionImport(final String name) throws EdmException { EdmFunctionImport edmFunctionImport = edmFunctionImports.get(name); if (edmFunctionImport != null) { return edmFunctionImport; } FunctionImport functionImport; try { functionImport = edm.edmProvider.getFunctionImport(entityCon... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmFunctionImport getFunctionImport(final String name) throws EdmException { EdmFunctionImport edmFunctionImport = edmFunctionImports.get(name); if (edmFunctionImport != null) { return edmFunctionImport; } FunctionImport functio... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmFunctionImport getFunctionImport(final String name) throws EdmException { EdmFunctionImport edmFunctionImport = edmFunctionImports.get(name); if (edmFunctionImport != null) { return edmFunctionImport; } FunctionImport functio... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmFunctionImport getFunctionImport(final String name) throws EdmException { EdmFunctionImport edmFunctionImport = edmFunctionImports.get(name); if (edmFunctionImport != null) { return edmFunctionImport; } FunctionImport functio... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmFunctionImport getFunctionImport(final String name) throws EdmException { EdmFunctionImport edmFunctionImport = edmFunctionImports.get(name); if (edmFunctionImport != null) { return edmFunctionImport; } FunctionImport functio... |
@Test public void getAnnotations() throws Exception { EdmAnnotatable annotatable = edmEntityContainer; EdmAnnotations annotations = annotatable.getAnnotations(); assertNull(annotations.getAnnotationAttributes()); assertNull(annotations.getAnnotationElements()); } | @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityContainer.getAnnotationAttributes(), entityContainer.getAnnotationElements()); } | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityContainer.getAnnotationAttributes(), entityContainer.getAnnotationElements()); } } | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityContainer.getAnnotationAttributes(), entityContainer.getAnnotationElements()); } EdmEntityContainerImplProv(final EdmImplProv edm, fin... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityContainer.getAnnotationAttributes(), entityContainer.getAnnotationElements()); } EdmEntityContainerImplProv(final EdmImplProv edm, fin... | EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public EdmAnnotations getAnnotations() throws EdmException { return new EdmAnnotationsImplProv(entityContainer.getAnnotationAttributes(), entityContainer.getAnnotationElements()); } EdmEntityContainerImplProv(final EdmImplProv edm, fin... |
@Test(expected = EdmException.class) public void testAssociationEntityType() throws Exception { EdmAssociationEnd associationEnd = associationEndProv; associationEnd.getEntityType(); } | @Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new EdmException(EdmException.COMMON); } return entityType; } | EdmAssociationEndImplProv implements EdmAssociationEnd, EdmAnnotatable { @Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new Ed... | EdmAssociationEndImplProv implements EdmAssociationEnd, EdmAnnotatable { @Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new Ed... | EdmAssociationEndImplProv implements EdmAssociationEnd, EdmAnnotatable { @Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new Ed... | EdmAssociationEndImplProv implements EdmAssociationEnd, EdmAnnotatable { @Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new Ed... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.