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 defaultSupportedContentTypesForEntity() throws Exception { List<String> types = service.getSupportedContentTypes(EntityProcessor.class); List<ContentType> convertedTypes = ContentType.convert(types); assertTrue(convertedTypes.contains(appendCharset(ContentType.APPLICATION_ATOM_XML))); assertTrue(conve... | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForServiceDocument() throws Exception { List<String> types = service.getSupportedContentTypes(ServiceDocumentProcessor.class); assertTrue(types.contains(APPLICATION_ATOM_SVC)); assertTrue(types.contains(APPLICATION_JSON)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForMetadata() throws Exception { List<String> types = service.getSupportedContentTypes(MetadataProcessor.class); assertTrue(types.contains(APPLICATION_XML)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForFunctionImport() throws Exception { List<String> types = service.getSupportedContentTypes(FunctionImportProcessor.class); assertTrue(types.contains(APPLICATION_XML)); assertTrue(types.contains(APPLICATION_JSON)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForEntityComplexProperty() throws Exception { List<String> types = service.getSupportedContentTypes(EntityComplexPropertyProcessor.class); assertTrue(types.contains(APPLICATION_XML)); assertTrue(types.contains(APPLICATION_JSON)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void testGetSchemas() { try { assertNotNull(edmProvider.getSchemas()); } catch (ODataException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } } | @Override public List<Schema> getSchemas() throws ODataException { if (schemas == null && jpaEdmModel != null) { jpaEdmModel.getBuilder().build(); schemas = new ArrayList<Schema>(); schemas.add(jpaEdmModel.getEdmSchemaView().getEdmSchema()); } if (jpaEdmModel == null) { throw ODataJPAModelException.throwException( ODat... | ODataJPAEdmProvider extends EdmProvider { @Override public List<Schema> getSchemas() throws ODataException { if (schemas == null && jpaEdmModel != null) { jpaEdmModel.getBuilder().build(); schemas = new ArrayList<Schema>(); schemas.add(jpaEdmModel.getEdmSchemaView().getEdmSchema()); } if (jpaEdmModel == null) { throw O... | ODataJPAEdmProvider extends EdmProvider { @Override public List<Schema> getSchemas() throws ODataException { if (schemas == null && jpaEdmModel != null) { jpaEdmModel.getBuilder().build(); schemas = new ArrayList<Schema>(); schemas.add(jpaEdmModel.getEdmSchemaView().getEdmSchema()); } if (jpaEdmModel == null) { throw O... | ODataJPAEdmProvider extends EdmProvider { @Override public List<Schema> getSchemas() throws ODataException { if (schemas == null && jpaEdmModel != null) { jpaEdmModel.getBuilder().build(); schemas = new ArrayList<Schema>(); schemas.add(jpaEdmModel.getEdmSchemaView().getEdmSchema()); } if (jpaEdmModel == null) { throw O... | ODataJPAEdmProvider extends EdmProvider { @Override public List<Schema> getSchemas() throws ODataException { if (schemas == null && jpaEdmModel != null) { jpaEdmModel.getBuilder().build(); schemas = new ArrayList<Schema>(); schemas.add(jpaEdmModel.getEdmSchemaView().getEdmSchema()); } if (jpaEdmModel == null) { throw O... |
@Test public void defaultSupportedContentTypesForEntitySimpleProperty() throws Exception { List<String> types = service.getSupportedContentTypes(EntitySimplePropertyProcessor.class); assertTrue(types.contains(APPLICATION_XML)); assertTrue(types.contains(APPLICATION_JSON)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForEntityLinks() throws Exception { List<String> types = service.getSupportedContentTypes(EntityLinksProcessor.class); assertTrue(types.contains(APPLICATION_XML)); assertTrue(types.contains(APPLICATION_JSON)); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForEntityLink() throws Exception { ContentType ctGif = ContentType.create("image", "gif"); List<String> types = service.getSupportedContentTypes(EntityLinkProcessor.class); assertTrue(types.contains(APPLICATION_XML)); assertTrue(types.contains(APPLICATION_JSON)); assertFals... | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesAndGifForEntityLink() throws Exception { String ctGif = ContentType.create("image", "gif").toContentTypeString(); when(((CustomContentType) processor).getCustomContentTypes(EntityLinkProcessor.class)).thenReturn(Arrays.asList(ctGif)); List<String> types = service.getSupport... | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForEntityMedia() throws Exception { List<String> types = service.getSupportedContentTypes(EntityMediaProcessor.class); assertTrue(types.contains(ContentType.WILDCARD.toContentTypeString())); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForSimplePropertyValue() throws Exception { List<String> types = service.getSupportedContentTypes(EntitySimplePropertyValueProcessor.class); assertTrue(types.contains(ContentType.WILDCARD.toContentTypeString())); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForFunctionImportValue() throws Exception { List<String> types = service.getSupportedContentTypes(FunctionImportValueProcessor.class); assertTrue(types.contains(ContentType.WILDCARD.toContentTypeString())); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void defaultSupportedContentTypesForBatch() throws Exception { List<String> types = service.getSupportedContentTypes(BatchProcessor.class); assertTrue(types.contains(ContentType.WILDCARD.toContentTypeString())); } | @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) processor).getCustomContentTypes(processorFeature)); } if... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... | ODataSingleProcessorService implements ODataService { @Override public List<String> getSupportedContentTypes(final Class<? extends ODataProcessor> processorFeature) throws ODataException { List<String> result = new ArrayList<String>(); if (processor instanceof CustomContentType) { result.addAll(((CustomContentType) pro... |
@Test public void testgetComplexTypeWithBuffer() { HashMap<String, ComplexType> compTypes = new HashMap<String, ComplexType>(); ComplexType comp = new ComplexType(); comp.setName("Address"); compTypes.put("salesorderprocessing" + "." + "Address", comp); ODataJPAEdmProvider jpaEdmProv = new ODataJPAEdmProvider(); Class<... | @Override public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (complexTypes.containsKey(edmFQName.toString())) { return complexTypes.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.ge... | ODataJPAEdmProvider extends EdmProvider { @Override public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (complexTypes.containsKey(edmFQName.toString())) { return complexTypes.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (complexTypes.containsKey(edmFQName.toString())) { return complexTypes.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (complexTypes.containsKey(edmFQName.toString())) { return complexTypes.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (complexTypes.containsKey(edmFQName.toString())) { return complexTypes.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... |
@Test public void testEmployees() { Employee employee1 = new Employee(1, null); Employee employee2 = new Employee(2, null); List<Employee> employeesList = Arrays.asList(employee1, employee2); Room room1 = new Room(1, null); room1.getEmployees().addAll(employeesList); employee1.setRoom(room1); employee2.setRoom(room1); ... | public List<Employee> getEmployees() { return employees; } | Room { public List<Employee> getEmployees() { return employees; } } | Room { public List<Employee> getEmployees() { return employees; } Room(final int id, final String name); } | Room { public List<Employee> getEmployees() { return employees; } Room(final int id, final String name); String getId(); String getName(); void setName(final String name); void setSeats(final int seats); int getSeats(); void setVersion(final int version); int getVersion(); void setBuilding(final Building building); Bui... | Room { public List<Employee> getEmployees() { return employees; } Room(final int id, final String name); String getId(); String getName(); void setName(final String name); void setSeats(final int seats); int getSeats(); void setVersion(final int version); int getVersion(); void setBuilding(final Building building); Bui... |
@Test public void testGetEntityContainerInfoWithBuffer() { HashMap<String, EntityContainerInfo> entityContainerInfos = new HashMap<String, EntityContainerInfo>(); EntityContainerInfo entityContainer = new EntityContainerInfo(); entityContainer.setName("salesorderprocessingContainer"); entityContainerInfos.put("salesord... | @Override public EntityContainerInfo getEntityContainerInfo(final String name) throws ODataException { if (entityContainerInfos.containsKey(name)) { return entityContainerInfos.get(name); } else { if (schemas == null) { getSchemas(); } List<EntityContainer> containerList = schemas.get(0).getEntityContainers(); if (cont... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityContainerInfo getEntityContainerInfo(final String name) throws ODataException { if (entityContainerInfos.containsKey(name)) { return entityContainerInfos.get(name); } else { if (schemas == null) { getSchemas(); } List<EntityContainer> containerList = sche... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityContainerInfo getEntityContainerInfo(final String name) throws ODataException { if (entityContainerInfos.containsKey(name)) { return entityContainerInfos.get(name); } else { if (schemas == null) { getSchemas(); } List<EntityContainer> containerList = sche... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityContainerInfo getEntityContainerInfo(final String name) throws ODataException { if (entityContainerInfos.containsKey(name)) { return entityContainerInfos.get(name); } else { if (schemas == null) { getSchemas(); } List<EntityContainer> containerList = sche... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityContainerInfo getEntityContainerInfo(final String name) throws ODataException { if (entityContainerInfos.containsKey(name)) { return entityContainerInfos.get(name); } else { if (schemas == null) { getSchemas(); } List<EntityContainer> containerList = sche... |
@Test public void testGetEntityTypeWithBuffer() { HashMap<String, com.sap.core.odata.api.edm.provider.EntityType> entityTypes = new HashMap<String, com.sap.core.odata.api.edm.provider.EntityType>(); com.sap.core.odata.api.edm.provider.EntityType entity = new com.sap.core.odata.api.edm.provider.EntityType(); entity.setN... | @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { String strEdmFQName = edmFQName.toString(); if (edmFQName != null) { if (entityTypes.containsKey(strEdmFQName)) { return entityTypes.get(strEdmFQName); } else if (schemas == null) { getSchemas(); } String entityTypeName... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { String strEdmFQName = edmFQName.toString(); if (edmFQName != null) { if (entityTypes.containsKey(strEdmFQName)) { return entityTypes.get(strEdmFQName); } else if (schemas == nul... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { String strEdmFQName = edmFQName.toString(); if (edmFQName != null) { if (entityTypes.containsKey(strEdmFQName)) { return entityTypes.get(strEdmFQName); } else if (schemas == nul... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { String strEdmFQName = edmFQName.toString(); if (edmFQName != null) { if (entityTypes.containsKey(strEdmFQName)) { return entityTypes.get(strEdmFQName); } else if (schemas == nul... | ODataJPAEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { String strEdmFQName = edmFQName.toString(); if (edmFQName != null) { if (entityTypes.containsKey(strEdmFQName)) { return entityTypes.get(strEdmFQName); } else if (schemas == nul... |
@Test public void testGetAssociationWithBuffer() { HashMap<String, Association> associations = new HashMap<String, Association>(); Association association = new Association(); association.setName("SalesOrderHeader_SalesOrderItem"); associations.put("salesorderprocessing" + "." + "SalesOrderHeader_SalesOrderItem", assoc... | @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.ge... | ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... | ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for... |
@Test public void testBuildSimpleQuery() throws EdmException, ODataJPARuntimeException { OrderByExpression orderByExpression = EasyMock.createMock(OrderByExpression.class); JPQLSelectContext jpqlSelectContextImpl = createSelectContext(orderByExpression, null); jpqlSelectStatementBuilder = new JPQLSelectStatementBuilder... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testBuildQueryWithOrderBy() throws EdmException, ODataJPARuntimeException { OrderByExpression orderByExpression = EasyMock.createMock(OrderByExpression.class); JPQLSelectContext jpqlSelectContextImpl = createSelectContext(orderByExpression, null); HashMap<String, String> orderByCollection = new HashMa... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testBuildQueryWithFilter() throws EdmException, ODataJPARuntimeException { OrderByExpression orderByExpression = EasyMock.createMock(OrderByExpression.class); FilterExpression filterExpression = null; JPQLSelectContext jpqlSelectContextImpl = createSelectContext(orderByExpression, filterExpression); j... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLSelectStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testBuild() throws Exception { setUp(getJoinClauseList()); JPQLJoinStatementBuilder jpqlJoinStatementBuilder = new JPQLJoinStatementBuilder(context); try { JPQLStatement jpqlStatement = jpqlJoinStatementBuilder.build(); assertEquals("SELECT mat FROM SOHeader soh JOIN soh.soItem soi JOIN soi.material m... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testJoinClauseAsNull() throws Exception { setUp(null); JPQLJoinStatementBuilder jpqlJoinStatementBuilder = new JPQLJoinStatementBuilder(context); try { jpqlJoinStatementBuilder.build(); fail("Should not have come here"); } catch (ODataJPARuntimeException e) { assertTrue(true); } } | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testJoinClauseListAsEmpty() throws Exception { setUp(new ArrayList<JPAJoinClause>()); JPQLJoinStatementBuilder jpqlJoinStatementBuilder = new JPQLJoinStatementBuilder(context); try { jpqlJoinStatementBuilder.build(); fail("Should not have come here"); } catch (ODataJPARuntimeException e) { assertTrue(... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testBuild() throws Exception { setUp(getJoinClauseList()); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { JPQLStatement jpqlStatement = jpqlJoinSelectsingleStatementBuilder.build(); assertEquals("SELECT gt1 FROM SOHe... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); ... |
@Test public void testReset() { dataContainer.init(); List<Team> data = dataContainer.getTeams(); for (Team team : data) { if (team.getId().equals("2")) { team.setName(NAME); assertEquals(team.getName(), NAME); } } dataContainer.reset(); data = dataContainer.getTeams(); for (Team team2 : data) { if (team2.getId() == "2... | public void reset() { employees.clear(); teams.clear(); rooms.clear(); managers.clear(); buildings.clear(); photos.clear(); employeeId = 0; teamId = 0; roomId = 0; buildingId = 0; photoId = 0; init(); } | DataContainer { public void reset() { employees.clear(); teams.clear(); rooms.clear(); managers.clear(); buildings.clear(); photos.clear(); employeeId = 0; teamId = 0; roomId = 0; buildingId = 0; photoId = 0; init(); } } | DataContainer { public void reset() { employees.clear(); teams.clear(); rooms.clear(); managers.clear(); buildings.clear(); photos.clear(); employeeId = 0; teamId = 0; roomId = 0; buildingId = 0; photoId = 0; init(); } } | DataContainer { public void reset() { employees.clear(); teams.clear(); rooms.clear(); managers.clear(); buildings.clear(); photos.clear(); employeeId = 0; teamId = 0; roomId = 0; buildingId = 0; photoId = 0; init(); } void init(); Employee createEmployee(); Team createTeam(); Room createRoom(); Manager createManager(... | DataContainer { public void reset() { employees.clear(); teams.clear(); rooms.clear(); managers.clear(); buildings.clear(); photos.clear(); employeeId = 0; teamId = 0; roomId = 0; buildingId = 0; photoId = 0; init(); } void init(); Employee createEmployee(); Team createTeam(); Room createRoom(); Manager createManager(... |
@Test public void testJoinClauseAsNull() throws Exception { setUp(null); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { jpqlJoinSelectsingleStatementBuilder.build(); fail("Should not have come here"); } catch (ODataJPARuntimeException... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); ... |
@Test public void testJoinClauseListAsEmpty() throws Exception { List<JPAJoinClause> joinClauseList = new ArrayList<JPAJoinClause>(); setUp(joinClauseList); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { jpqlJoinSelectsingleStatementB... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); ... |
@Test public void testGetJPAOuterJoinClauses() throws Exception { setUp(false); JPQLJoinSelectSingleContext joinContext = new JPQLJoinSelectSingleContext(); JPQLJoinSelectSingleContextBuilder joinContextBuilder = joinContext.new JPQLJoinSelectSingleContextBuilder(); try { joinContextBuilder.entityView = entityUriInfo; ... | @Override public List<JPAJoinClause> getJPAJoinClauses() { return jpaJoinClauses; } | JPQLJoinSelectSingleContext extends JPQLSelectSingleContext implements JPQLJoinSelectSingleContextView { @Override public List<JPAJoinClause> getJPAJoinClauses() { return jpaJoinClauses; } } | JPQLJoinSelectSingleContext extends JPQLSelectSingleContext implements JPQLJoinSelectSingleContextView { @Override public List<JPAJoinClause> getJPAJoinClauses() { return jpaJoinClauses; } } | JPQLJoinSelectSingleContext extends JPQLSelectSingleContext implements JPQLJoinSelectSingleContextView { @Override public List<JPAJoinClause> getJPAJoinClauses() { return jpaJoinClauses; } @Override List<JPAJoinClause> getJPAJoinClauses(); } | JPQLJoinSelectSingleContext extends JPQLSelectSingleContext implements JPQLJoinSelectSingleContextView { @Override public List<JPAJoinClause> getJPAJoinClauses() { return jpaJoinClauses; } @Override List<JPAJoinClause> getJPAJoinClauses(); } |
@Test public void testBuildSimpleQuery() throws EdmException, ODataJPARuntimeException { JPQLSelectSingleContext JPQLSelectSingleContextImpl = createSelectContext(); JPQLSelectSingleStatementBuilder = new JPQLSelectSingleStatementBuilder(JPQLSelectSingleContextImpl); assertEquals("SELECT E1 FROM SalesOrderHeader E1 WHE... | @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } | JPQLSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } } | JPQLSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectSingleStatementBuilder(final JPQLContextView context); } | JPQLSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } | JPQLSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); return jpqlStatement; } JPQLSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); } |
@Test public void testGetBuilder() { assertNotNull(objJPAEdmEntityContainer.getBuilder()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Ov... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Ov... |
@Test public void testGetEdmEntityContainer() { assertNotNull(objJPAEdmEntityContainer.getEdmEntityContainer()); assertTrue(objJPAEdmEntityContainer.getEdmEntityContainer().getEntitySets().size() > 0); } | @Override public EntityContainer getEdmEntityContainer() { return currentEntityContainer; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public EntityContainer getEdmEntityContainer() { return currentEntityContainer; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public EntityContainer getEdmEntityContainer() { return currentEntityContainer; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public EntityContainer getEdmEntityContainer() { return currentEntityContainer; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntityContaine... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public EntityContainer getEdmEntityContainer() { return currentEntityContainer; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntityContaine... |
@Test public void testGetConsistentEdmEntityContainerList() { assertNotNull(objJPAEdmEntityContainer.getConsistentEdmEntityContainerList()); assertTrue(objJPAEdmEntityContainer.getConsistentEdmEntityContainerList().size() > 0); } | @Override public List<EntityContainer> getConsistentEdmEntityContainerList() { return consistentEntityContainerList; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public List<EntityContainer> getConsistentEdmEntityContainerList() { return consistentEntityContainerList; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public List<EntityContainer> getConsistentEdmEntityContainerList() { return consistentEntityContainerList; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public List<EntityContainer> getConsistentEdmEntityContainerList() { return consistentEntityContainerList; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityCon... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public List<EntityContainer> getConsistentEdmEntityContainerList() { return consistentEntityContainerList; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityCon... |
@Test public void testGetJPAEdmEntitySetView() { assertNotNull(objJPAEdmEntityContainer.getJPAEdmEntitySetView()); assertEquals("salesorderprocessing", objJPAEdmEntityContainer.getJPAEdmEntitySetView().getpUnitName()); } | @Override public JPAEdmEntitySetView getJPAEdmEntitySetView() { return entitySetView; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmEntitySetView getJPAEdmEntitySetView() { return entitySetView; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmEntitySetView getJPAEdmEntitySetView() { return entitySetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmEntitySetView getJPAEdmEntitySetView() { return entitySetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntityContainer();... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmEntitySetView getJPAEdmEntitySetView() { return entitySetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntityContainer();... |
@Test public void testIsConsistent() { assertTrue(objJPAEdmEntityContainer.isConsistent()); objJPAEdmEntityContainer.clean(); assertFalse(objJPAEdmEntityContainer.isConsistent()); } | @Override public void clean() { super.clean(); entitySetView = null; associationSetView = null; currentEntityContainer = null; consistentEntityContainerList = null; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public void clean() { super.clean(); entitySetView = null; associationSetView = null; currentEntityContainer = null; consistentEntityContainerList = null; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public void clean() { super.clean(); entitySetView = null; associationSetView = null; currentEntityContainer = null; consistentEntityContainerList = null; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public void clean() { super.clean(); entitySetView = null; associationSetView = null; currentEntityContainer = null; consistentEntityContainerList = null; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public void clean() { super.clean(); entitySetView = null; associationSetView = null; currentEntityContainer = null; consistentEntityContainerList = null; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override... |
@Test public void testGetEdmAssociationSetView() { assertNotNull(objJPAEdmEntityContainer.getEdmAssociationSetView()); } | @Override public JPAEdmAssociationSetView getEdmAssociationSetView() { return associationSetView; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmAssociationSetView getEdmAssociationSetView() { return associationSetView; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmAssociationSetView getEdmAssociationSetView() { return associationSetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmAssociationSetView getEdmAssociationSetView() { return associationSetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntity... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmAssociationSetView getEdmAssociationSetView() { return associationSetView; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntityContainer getEdmEntity... |
@Test public void testInit() { dataContainer.init(); assertFalse(dataContainer.getEmployees().isEmpty()); assertFalse(dataContainer.getTeams().isEmpty()); assertFalse(dataContainer.getRooms().isEmpty()); assertFalse(dataContainer.getManagers().isEmpty()); assertFalse(dataContainer.getBuildings().isEmpty()); assertFalse... | public void init() { Team team1 = createTeam(); team1.setScrumTeam(false); teams.add(team1); Team team2 = createTeam(); team2.setScrumTeam(true); teams.add(team2); Team team3 = createTeam(); team3.setScrumTeam(false); teams.add(team3); Building building1 = createBuilding(); buildings.add(building1); Building building2 ... | DataContainer { public void init() { Team team1 = createTeam(); team1.setScrumTeam(false); teams.add(team1); Team team2 = createTeam(); team2.setScrumTeam(true); teams.add(team2); Team team3 = createTeam(); team3.setScrumTeam(false); teams.add(team3); Building building1 = createBuilding(); buildings.add(building1); Bui... | DataContainer { public void init() { Team team1 = createTeam(); team1.setScrumTeam(false); teams.add(team1); Team team2 = createTeam(); team2.setScrumTeam(true); teams.add(team2); Team team3 = createTeam(); team3.setScrumTeam(false); teams.add(team3); Building building1 = createBuilding(); buildings.add(building1); Bui... | DataContainer { public void init() { Team team1 = createTeam(); team1.setScrumTeam(false); teams.add(team1); Team team2 = createTeam(); team2.setScrumTeam(true); teams.add(team2); Team team3 = createTeam(); team3.setScrumTeam(false); teams.add(team3); Building building1 = createBuilding(); buildings.add(building1); Bui... | DataContainer { public void init() { Team team1 = createTeam(); team1.setScrumTeam(false); teams.add(team1); Team team2 = createTeam(); team2.setScrumTeam(true); teams.add(team2); Team team3 = createTeam(); team3.setScrumTeam(false); teams.add(team3); Building building1 = createBuilding(); buildings.add(building1); Bui... |
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmEntityContainer.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmEntityContainer.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); } | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Ov... | JPAEdmEntityContainer extends JPAEdmBaseViewImpl implements
JPAEdmEntityContainerView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntityContainerBuilder(); } return builder; } JPAEdmEntityContainer(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Ov... |
@Test public void testClean() { assertTrue(objJPAEdmSchema.isConsistent()); objJPAEdmSchema.clean(); assertFalse(objJPAEdmSchema.isConsistent()); } | @Override public void clean() { super.clean(); schema = null; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema ... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema ... |
@Test public void testGetEdmSchema() { assertNull(objJPAEdmSchema.getEdmSchema()); } | @Override public Schema getEdmSchema() { return schema; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public Schema getEdmSchema() { return schema; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public Schema getEdmSchema() { return schema; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public Schema getEdmSchema() { return schema; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema getEdm... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public Schema getEdmSchema() { return schema; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema getEdm... |
@Test public void testGetJPAEdmEntityContainerView() { assertNull(objJPAEdmSchema.getJPAEdmEntityContainerView()); } | @Override public JPAEdmEntityContainerView getJPAEdmEntityContainerView() { return entityContainerView; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmEntityContainerView getJPAEdmEntityContainerView() { return entityContainerView; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmEntityContainerView getJPAEdmEntityContainerView() { return entityContainerView; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmEntityContainerView getJPAEdmEntityContainerView() { return entityContainerView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final ... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmEntityContainerView getJPAEdmEntityContainerView() { return entityContainerView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final ... |
@Test public void testGetJPAEdmComplexTypeView() { assertNull(objJPAEdmSchema.getJPAEdmComplexTypeView()); } | @Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView() { return complexTypeView; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView() { return complexTypeView; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView() { return complexTypeView; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView() { return complexTypeView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String compl... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView() { return complexTypeView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String compl... |
@Test public void testGetBuilder() { assertNotNull(objJPAEdmSchema.getBuilder()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonK... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonK... |
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmSchema.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmSchema.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonK... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmSchemaBuilder(); } return builder; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonK... |
@Test public void testGetJPAEdmAssociationView() { assertNull(objJPAEdmSchema.getJPAEdmAssociationView()); } | @Override public final JPAEdmAssociationView getJPAEdmAssociationView() { return associationView; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public final JPAEdmAssociationView getJPAEdmAssociationView() { return associationView; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public final JPAEdmAssociationView getJPAEdmAssociationView() { return associationView; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public final JPAEdmAssociationView getJPAEdmAssociationView() { return associationView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public final JPAEdmAssociationView getJPAEdmAssociationView() { return associationView; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String... |
@Test public void testIsConsistent() { assertTrue(objJPAEdmSchema.isConsistent()); objJPAEdmSchema.clean(); assertFalse(objJPAEdmSchema.isConsistent()); } | @Override public void clean() { super.clean(); schema = null; } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); } | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema ... | JPAEdmSchema extends JPAEdmBaseViewImpl implements
JPAEdmSchemaView { @Override public void clean() { super.clean(); schema = null; } JPAEdmSchema(final JPAEdmModelView modelView); @Override List<String> getNonKeyComplexTypeList(); @Override void addNonKeyComplexName(final String complexTypeName); @Override Schema ... |
@Test public void testGetBuilder() { assertNotNull(objJPAEdmEntitySet.getBuilder()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmE... | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmE... |
@Test public void testId() { Building build1 = new Building(1, null); assertNotNull(build1.getId()); } | public String getId() { return Integer.toString(id); } | Building { public String getId() { return Integer.toString(id); } } | Building { public String getId() { return Integer.toString(id); } Building(final int id, final String name); } | Building { public String getId() { return Integer.toString(id); } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object... | Building { public String getId() { return Integer.toString(id); } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object... |
@Test public void testGetEdmEntitySet() { assertNotNull(objJPAEdmEntitySet.getEdmEntitySet()); assertNotNull(objJPAEdmEntitySet.getEdmEntitySet().getEntityType()); } | @Override public EntitySet getEdmEntitySet() { return currentEntitySet; } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public EntitySet getEdmEntitySet() { return currentEntitySet; } } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public EntitySet getEdmEntitySet() { return currentEntitySet; } JPAEdmEntitySet(final JPAEdmSchemaView view); } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public EntitySet getEdmEntitySet() { return currentEntitySet; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<EntitySet> getConsistentEdmE... | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public EntitySet getEdmEntitySet() { return currentEntitySet; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<EntitySet> getConsistentEdmE... |
@Test public void testGetConsistentEntitySetList() { assertTrue(objJPAEdmEntitySet.getConsistentEdmEntitySetList().size() > 0); } | @Override public List<EntitySet> getConsistentEdmEntitySetList() { return consistentEntitySetList; } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public List<EntitySet> getConsistentEdmEntitySetList() { return consistentEntitySetList; } } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public List<EntitySet> getConsistentEdmEntitySetList() { return consistentEntitySetList; } JPAEdmEntitySet(final JPAEdmSchemaView view); } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public List<EntitySet> getConsistentEdmEntitySetList() { return consistentEntitySetList; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<E... | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public List<EntitySet> getConsistentEdmEntitySetList() { return consistentEntitySetList; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<E... |
@Test public void testGetJPAEdmEntityTypeView() { assertNotNull(objJPAEdmEntitySet.getJPAEdmEntityTypeView()); assertEquals("salesorderprocessing", objJPAEdmEntitySet.getJPAEdmEntityTypeView().getpUnitName()); } | @Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView() { return entityTypeView; } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView() { return entityTypeView; } } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView() { return entityTypeView; } JPAEdmEntitySet(final JPAEdmSchemaView view); } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView() { return entityTypeView; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<EntitySet> ... | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView() { return entityTypeView; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmEntitySet(); @Override List<EntitySet> ... |
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmEntitySet.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmEntitySet.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); } | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmE... | JPAEdmEntitySet extends JPAEdmBaseViewImpl implements
JPAEdmEntitySetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmEntitySetBuilder(); } return builder; } JPAEdmEntitySet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override EntitySet getEdmE... |
@Test public void testGetBuilder() { assertNotNull(objNavigationProperty.getBuilder()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... |
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objNavigationProperty.getBuilder(); JPAEdmBuilder builder2 = objNavigationProperty.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); } | @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmNavigationPropertyBuilder(); } return builder; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JP... |
@Test public void testGetEdmNavigationProperty() { if (objNavigationProperty == null || objNavigationProperty.getEdmNavigationProperty() == null) { JPAEdmNavigationPropertyTest localView = new JPAEdmNavigationPropertyTest(); navPropView = new JPAEdmNavigationPropertyTest(); objNavigationProperty = new JPAEdmNavigationP... | @Override public NavigationProperty getEdmNavigationProperty() { return currentNavigationProperty; } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public NavigationProperty getEdmNavigationProperty() { return currentNavigationProperty; } } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public NavigationProperty getEdmNavigationProperty() { return currentNavigationProperty; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyView propertyView, final ... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public NavigationProperty getEdmNavigationProperty() { return currentNavigationProperty; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyView propertyView, final ... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public NavigationProperty getEdmNavigationProperty() { return currentNavigationProperty; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyView propertyView, final ... |
@Test public void testGetConsistentEdmNavigationProperties() { assertTrue(objNavigationProperty.getConsistentEdmNavigationProperties() .size() > 0); } | @Override public List<NavigationProperty> getConsistentEdmNavigationProperties() { return consistentNavigationProperties; } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public List<NavigationProperty> getConsistentEdmNavigationProperties() { return consistentNavigationProperties; } } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public List<NavigationProperty> getConsistentEdmNavigationProperties() { return consistentNavigationProperties; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyVi... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public List<NavigationProperty> getConsistentEdmNavigationProperties() { return consistentNavigationProperties; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyVi... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public List<NavigationProperty> getConsistentEdmNavigationProperties() { return consistentNavigationProperties; } JPAEdmNavigationProperty(final JPAEdmAssociationView associationView,
final JPAEdmPropertyVi... |
@Test public void testAddJPAEdmNavigationPropertyView() { JPAEdmNavigationPropertyTest localView = new JPAEdmNavigationPropertyTest(); navPropView = new JPAEdmNavigationPropertyTest(); objNavigationProperty = new JPAEdmNavigationProperty(localView, localView, 1); try { objNavigationProperty.getBuilder().build(); } catc... | @Override public void addJPAEdmNavigationPropertyView( final JPAEdmNavigationPropertyView view) { if (view != null && view.isConsistent()) { currentNavigationProperty = view.getEdmNavigationProperty(); consistentNavigationProperties.add(currentNavigationProperty); } } | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public void addJPAEdmNavigationPropertyView( final JPAEdmNavigationPropertyView view) { if (view != null && view.isConsistent()) { currentNavigationProperty = view.getEdmNavigationProperty(); consistentNavigation... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public void addJPAEdmNavigationPropertyView( final JPAEdmNavigationPropertyView view) { if (view != null && view.isConsistent()) { currentNavigationProperty = view.getEdmNavigationProperty(); consistentNavigation... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public void addJPAEdmNavigationPropertyView( final JPAEdmNavigationPropertyView view) { if (view != null && view.isConsistent()) { currentNavigationProperty = view.getEdmNavigationProperty(); consistentNavigation... | JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements
JPAEdmNavigationPropertyView { @Override public void addJPAEdmNavigationPropertyView( final JPAEdmNavigationPropertyView view) { if (view != null && view.isConsistent()) { currentNavigationProperty = view.getEdmNavigationProperty(); consistentNavigation... |
@Test public void testGetEdmSchemaView() { assertNotNull(objJPAEdmModel.getEdmSchemaView()); } | @Override public JPAEdmSchemaView getEdmSchemaView() { return schemaView; } | JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmSchemaView getEdmSchemaView() { return schemaView; } } | JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmSchemaView getEdmSchemaView() { return schemaView; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); } | JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmSchemaView getEdmSchemaView() { return schemaView; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); @Override JPAEdmSchemaView getEdmSchemaView(); @Override JPAEdmBuilder ... | JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmSchemaView getEdmSchemaView() { return schemaView; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); @Override JPAEdmSchemaView getEdmSchemaView(); @Override JPAEdmBuilder ... |
@Test public void testName() { Building build1 = new Building(1, VALUE_NAME); assertEquals(VALUE_NAME, build1.getName()); } | public String getName() { return name; } | Building { public String getName() { return name; } } | Building { public String getName() { return name; } Building(final int id, final String name); } | Building { public String getName() { return name; } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object obj); @Overri... | Building { public String getName() { return name; } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object obj); @Overri... |
@Test public void guessTimezoneCodeTest() throws Exception { assertEquals("Thu, 04 APR 2013 20:37:27 +10", DateUtil.guessTimezoneOffset("Thu, 04 APR 2013 20:37:27 AEST")); } | public static String guessTimezoneOffset(String date) { for (Entry<String, String> entry : TIMEZONE_CODE_MAP.entrySet()) { String code = entry.getKey(); String offset = entry.getValue(); String pattern = " \\(?" + code + "\\)?"; if (date.matches(".+" + pattern)) { return date.replaceAll(pattern, offset); } } return dat... | DateUtil { public static String guessTimezoneOffset(String date) { for (Entry<String, String> entry : TIMEZONE_CODE_MAP.entrySet()) { String code = entry.getKey(); String offset = entry.getValue(); String pattern = " \\(?" + code + "\\)?"; if (date.matches(".+" + pattern)) { return date.replaceAll(pattern, offset); } }... | DateUtil { public static String guessTimezoneOffset(String date) { for (Entry<String, String> entry : TIMEZONE_CODE_MAP.entrySet()) { String code = entry.getKey(); String offset = entry.getValue(); String pattern = " \\(?" + code + "\\)?"; if (date.matches(".+" + pattern)) { return date.replaceAll(pattern, offset); } }... | DateUtil { public static String guessTimezoneOffset(String date) { for (Entry<String, String> entry : TIMEZONE_CODE_MAP.entrySet()) { String code = entry.getKey(); String offset = entry.getValue(); String pattern = " \\(?" + code + "\\)?"; if (date.matches(".+" + pattern)) { return date.replaceAll(pattern, offset); } }... | DateUtil { public static String guessTimezoneOffset(String date) { for (Entry<String, String> entry : TIMEZONE_CODE_MAP.entrySet()) { String code = entry.getKey(); String offset = entry.getValue(); String pattern = " \\(?" + code + "\\)?"; if (date.matches(".+" + pattern)) { return date.replaceAll(pattern, offset); } }... |
@Test public void faviconDownloaderDoubleFineTest() { FaviconDownloader downloader = new FaviconDownloader(); String tempDir = System.getProperty("java.io.tmpdir"); String filename = downloader.downloadFaviconFromPage("/projects/doublefine/double-fine-adventure/posts", tempDir, "favicon"); if (filename == null) { filen... | public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is); return null; } }.... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... |
@Test public void parseDateTest() throws Exception { assertNotNull(DateUtil.parseDate("Fri Jan 06 2017 16:13:28 GMT+0900 (JST)", RssReader.DF_RSS)); } | public static Date parseDate(String date, DateTimeFormatter df) { if (StringUtils.isBlank(date)) { return null; } try { return df.parseDateTime(date).toDate(); } catch (IllegalArgumentException e) { } String dateWithOffset = guessTimezoneOffset(date); if (!dateWithOffset.equals(date)) { try { return df.parseDateTime(da... | DateUtil { public static Date parseDate(String date, DateTimeFormatter df) { if (StringUtils.isBlank(date)) { return null; } try { return df.parseDateTime(date).toDate(); } catch (IllegalArgumentException e) { } String dateWithOffset = guessTimezoneOffset(date); if (!dateWithOffset.equals(date)) { try { return df.parse... | DateUtil { public static Date parseDate(String date, DateTimeFormatter df) { if (StringUtils.isBlank(date)) { return null; } try { return df.parseDateTime(date).toDate(); } catch (IllegalArgumentException e) { } String dateWithOffset = guessTimezoneOffset(date); if (!dateWithOffset.equals(date)) { try { return df.parse... | DateUtil { public static Date parseDate(String date, DateTimeFormatter df) { if (StringUtils.isBlank(date)) { return null; } try { return df.parseDateTime(date).toDate(); } catch (IllegalArgumentException e) { } String dateWithOffset = guessTimezoneOffset(date); if (!dateWithOffset.equals(date)) { try { return df.parse... | DateUtil { public static Date parseDate(String date, DateTimeFormatter df) { if (StringUtils.isBlank(date)) { return null; } try { return df.parseDateTime(date).toDate(); } catch (IllegalArgumentException e) { } String dateWithOffset = guessTimezoneOffset(date); if (!dateWithOffset.equals(date)) { try { return df.parse... |
@Test public void getBaseUriTest() throws Exception { assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("https: } | public static String getBaseUri(Feed feed, Article article) { if (article.getBaseUri() != null) { return article.getBaseUri(); } if (feed.getBaseUri() != null) { return feed.getBaseUri(); } if (feed.getUrl() != null) { try { return getBaseUri(feed.getUrl()); } catch (MalformedURLException e) { } } return null; } | UrlUtil { public static String getBaseUri(Feed feed, Article article) { if (article.getBaseUri() != null) { return article.getBaseUri(); } if (feed.getBaseUri() != null) { return feed.getBaseUri(); } if (feed.getUrl() != null) { try { return getBaseUri(feed.getUrl()); } catch (MalformedURLException e) { } } return null... | UrlUtil { public static String getBaseUri(Feed feed, Article article) { if (article.getBaseUri() != null) { return article.getBaseUri(); } if (feed.getBaseUri() != null) { return feed.getBaseUri(); } if (feed.getUrl() != null) { try { return getBaseUri(feed.getUrl()); } catch (MalformedURLException e) { } } return null... | UrlUtil { public static String getBaseUri(Feed feed, Article article) { if (article.getBaseUri() != null) { return article.getBaseUri(); } if (feed.getBaseUri() != null) { return feed.getBaseUri(); } if (feed.getUrl() != null) { try { return getBaseUri(feed.getUrl()); } catch (MalformedURLException e) { } } return null... | UrlUtil { public static String getBaseUri(Feed feed, Article article) { if (article.getBaseUri() != null) { return article.getBaseUri(); } if (feed.getBaseUri() != null) { return feed.getBaseUri(); } if (feed.getUrl() != null) { try { return getBaseUri(feed.getUrl()); } catch (MalformedURLException e) { } } return null... |
@Test public void completeUrlTest() throws Exception { assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: } | public static String completeUrl(String baseUrl, String relativeUrl) throws MalformedURLException { baseUrl = Strings.nullToEmpty(baseUrl).trim(); relativeUrl = relativeUrl.trim(); if (relativeUrl.toLowerCase().startsWith("http")) { return new URL(relativeUrl).toString(); } if (relativeUrl.toLowerCase().startsWith("mai... | UrlUtil { public static String completeUrl(String baseUrl, String relativeUrl) throws MalformedURLException { baseUrl = Strings.nullToEmpty(baseUrl).trim(); relativeUrl = relativeUrl.trim(); if (relativeUrl.toLowerCase().startsWith("http")) { return new URL(relativeUrl).toString(); } if (relativeUrl.toLowerCase().start... | UrlUtil { public static String completeUrl(String baseUrl, String relativeUrl) throws MalformedURLException { baseUrl = Strings.nullToEmpty(baseUrl).trim(); relativeUrl = relativeUrl.trim(); if (relativeUrl.toLowerCase().startsWith("http")) { return new URL(relativeUrl).toString(); } if (relativeUrl.toLowerCase().start... | UrlUtil { public static String completeUrl(String baseUrl, String relativeUrl) throws MalformedURLException { baseUrl = Strings.nullToEmpty(baseUrl).trim(); relativeUrl = relativeUrl.trim(); if (relativeUrl.toLowerCase().startsWith("http")) { return new URL(relativeUrl).toString(); } if (relativeUrl.toLowerCase().start... | UrlUtil { public static String completeUrl(String baseUrl, String relativeUrl) throws MalformedURLException { baseUrl = Strings.nullToEmpty(baseUrl).trim(); relativeUrl = relativeUrl.trim(); if (relativeUrl.toLowerCase().startsWith("http")) { return new URL(relativeUrl).toString(); } if (relativeUrl.toLowerCase().start... |
@Test @Ignore public void testUpnp() throws Exception { assertTrue(NetworkUtil.mapTcpPort(4040)); } | public static boolean mapTcpPort(int port) { try { GatewayDiscover discover = new GatewayDiscover(); discover.discover(); GatewayDevice device = discover.getValidGateway(); if (device != null) { PortMappingEntry portMapping = new PortMappingEntry(); if (device.getSpecificPortMappingEntry(port, "TCP", portMapping)) { lo... | NetworkUtil { public static boolean mapTcpPort(int port) { try { GatewayDiscover discover = new GatewayDiscover(); discover.discover(); GatewayDevice device = discover.getValidGateway(); if (device != null) { PortMappingEntry portMapping = new PortMappingEntry(); if (device.getSpecificPortMappingEntry(port, "TCP", port... | NetworkUtil { public static boolean mapTcpPort(int port) { try { GatewayDiscover discover = new GatewayDiscover(); discover.discover(); GatewayDevice device = discover.getValidGateway(); if (device != null) { PortMappingEntry portMapping = new PortMappingEntry(); if (device.getSpecificPortMappingEntry(port, "TCP", port... | NetworkUtil { public static boolean mapTcpPort(int port) { try { GatewayDiscover discover = new GatewayDiscover(); discover.discover(); GatewayDevice device = discover.getValidGateway(); if (device != null) { PortMappingEntry portMapping = new PortMappingEntry(); if (device.getSpecificPortMappingEntry(port, "TCP", port... | NetworkUtil { public static boolean mapTcpPort(int port) { try { GatewayDiscover discover = new GatewayDiscover(); discover.discover(); GatewayDevice device = discover.getValidGateway(); if (device != null) { PortMappingEntry portMapping = new PortMappingEntry(); if (device.getSpecificPortMappingEntry(port, "TCP", port... |
@Test public void listFilesTest() throws Exception { List<String> fileList = ResourceUtil.list(Test.class, "/junit/framework"); assertTrue(fileList.contains("Test.class")); fileList = ResourceUtil.list(Test.class, "/junit/framework/"); assertTrue(fileList.contains("Test.class")); fileList = ResourceUtil.list(Test.class... | public static List<String> list(Class<?> clazz, String path, FilenameFilter filter) throws URISyntaxException, IOException { URL dirUrl = clazz.getResource(path); if (dirUrl != null && dirUrl.getProtocol().equals("file")) { return Arrays.asList(new File(dirUrl.toURI()).list(filter)); } if (dirUrl == null) { String clas... | ResourceUtil { public static List<String> list(Class<?> clazz, String path, FilenameFilter filter) throws URISyntaxException, IOException { URL dirUrl = clazz.getResource(path); if (dirUrl != null && dirUrl.getProtocol().equals("file")) { return Arrays.asList(new File(dirUrl.toURI()).list(filter)); } if (dirUrl == null... | ResourceUtil { public static List<String> list(Class<?> clazz, String path, FilenameFilter filter) throws URISyntaxException, IOException { URL dirUrl = clazz.getResource(path); if (dirUrl != null && dirUrl.getProtocol().equals("file")) { return Arrays.asList(new File(dirUrl.toURI()).list(filter)); } if (dirUrl == null... | ResourceUtil { public static List<String> list(Class<?> clazz, String path, FilenameFilter filter) throws URISyntaxException, IOException { URL dirUrl = clazz.getResource(path); if (dirUrl != null && dirUrl.getProtocol().equals("file")) { return Arrays.asList(new File(dirUrl.toURI()).list(filter)); } if (dirUrl == null... | ResourceUtil { public static List<String> list(Class<?> clazz, String path, FilenameFilter filter) throws URISyntaxException, IOException { URL dirUrl = clazz.getResource(path); if (dirUrl != null && dirUrl.getProtocol().equals("file")) { return Arrays.asList(new File(dirUrl.toURI()).list(filter)); } if (dirUrl == null... |
@Test public void loadResourceFileTest() { Map<Object, Object> properties = ResourceUtil.loadPropertiesFromUrl(TestResourceUtil.class.getResource("/config.properties")); assertNotNull(properties); assertTrue(properties.size() > 0); } | public static Map<Object, Object> loadPropertiesFromUrl(URL url) throws RuntimeException { InputStream is = null; try { is = url.openStream(); Properties properties = new Properties(); properties.load(is); return properties; } catch (IOException e) { throw new RuntimeException("Cannot load properties file for url: " + ... | ResourceUtil { public static Map<Object, Object> loadPropertiesFromUrl(URL url) throws RuntimeException { InputStream is = null; try { is = url.openStream(); Properties properties = new Properties(); properties.load(is); return properties; } catch (IOException e) { throw new RuntimeException("Cannot load properties fil... | ResourceUtil { public static Map<Object, Object> loadPropertiesFromUrl(URL url) throws RuntimeException { InputStream is = null; try { is = url.openStream(); Properties properties = new Properties(); properties.load(is); return properties; } catch (IOException e) { throw new RuntimeException("Cannot load properties fil... | ResourceUtil { public static Map<Object, Object> loadPropertiesFromUrl(URL url) throws RuntimeException { InputStream is = null; try { is = url.openStream(); Properties properties = new Properties(); properties.load(is); return properties; } catch (IOException e) { throw new RuntimeException("Cannot load properties fil... | ResourceUtil { public static Map<Object, Object> loadPropertiesFromUrl(URL url) throws RuntimeException { InputStream is = null; try { is = url.openStream(); Properties properties = new Properties(); properties.load(is); return properties; } catch (IOException e) { throw new RuntimeException("Cannot load properties fil... |
@Test public void htmlLeMessagerFailTest() throws Exception { InputStream is = getClass().getResourceAsStream("/feed/feed_error_lemessager.html"); RssReader reader = new RssReader(); try { reader.readRssFeed(is); Assert.fail("Root element should be wrong"); } catch (Exception e) { assertTrue(e.getMessage().contains("Ro... | public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUtil.detectGzip(is), "UTF-8"); InputSo... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... |
@Test public void htmlTooManyRecoveryTest() throws Exception { InputStream is = getClass().getResourceAsStream("/feed/feed_error_toomanyfatalerror.html"); RssReader reader = new RssReader(); try { reader.readRssFeed(is); Assert.fail("Root element should be wrong"); } catch (Exception e) { assertTrue(e.getMessage().cont... | public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUtil.detectGzip(is), "UTF-8"); InputSo... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... | RssReader extends DefaultHandler { public void readRssFeed(InputStream is) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setFeature("http: factory.setFeature("http: SAXParser parser = factory.newSAXParser(); Reader reader = new XmlReader(StreamUti... |
@Test public void faviconDownloaderAbstruseGooseTest() { FaviconDownloader downloader = new FaviconDownloader(); String tempDir = System.getProperty("java.io.tmpdir"); String filename = downloader.downloadFaviconFromPage("http: assertNotNull(filename); assertTrue(new File(filename).exists()); } | public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is); return null; } }.... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... | FaviconDownloader { public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) { String faviconUrl = null; try { final FaviconExtractor extractor = new FaviconExtractor(pageUrl); new ReaderHttpClient() { @Override public Void process(InputStream is) throws Exception { extractor.readPage(is... |
@Test public void test() throws IOException { @SuppressWarnings("unused") TestInstance tt = new TestInstance(); HeapImage hi = HeapUnit.captureHeap(); System.out.println("String count: " + hi.instanceCount(String.class)); Assert.assertTrue(hi.instanceCount(String.class) > 0); System.out.println("List count: " + hi.inst... | public static HeapImage captureHeap() throws IOException { String path = "target/heapunit/" + System.currentTimeMillis() + ".hprof"; return new SimpleHeapImage(HeapDumpProcuder.makeHeapDump(path, TimeUnit.SECONDS.toMillis(60))); } | HeapUnit { public static HeapImage captureHeap() throws IOException { String path = "target/heapunit/" + System.currentTimeMillis() + ".hprof"; return new SimpleHeapImage(HeapDumpProcuder.makeHeapDump(path, TimeUnit.SECONDS.toMillis(60))); } } | HeapUnit { public static HeapImage captureHeap() throws IOException { String path = "target/heapunit/" + System.currentTimeMillis() + ".hprof"; return new SimpleHeapImage(HeapDumpProcuder.makeHeapDump(path, TimeUnit.SECONDS.toMillis(60))); } } | HeapUnit { public static HeapImage captureHeap() throws IOException { String path = "target/heapunit/" + System.currentTimeMillis() + ".hprof"; return new SimpleHeapImage(HeapDumpProcuder.makeHeapDump(path, TimeUnit.SECONDS.toMillis(60))); } static HeapImage captureHeap(); } | HeapUnit { public static HeapImage captureHeap() throws IOException { String path = "target/heapunit/" + System.currentTimeMillis() + ".hprof"; return new SimpleHeapImage(HeapDumpProcuder.makeHeapDump(path, TimeUnit.SECONDS.toMillis(60))); } static HeapImage captureHeap(); } |
@Test public void isEqualUsingConstantTime() { byte [] bytes = "some bytes".getBytes(); byte [] sameBytes = "some bytes".getBytes(); byte [] differentBytes = "different bytes".getBytes(); assertThat(ByteArrayUtils.isEqualUsingConstantTime(bytes, sameBytes)).isTrue(); assertThat(ByteArrayUtils.isEqualUsingConstantTime(s... | public static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2) { if (val1.length != val2.length) { return false; } int result = 0; for (int i = 0; i < val1.length; i++) { result |= val1[i] ^ val2[i]; } return result == 0; } | ByteArrayUtils { public static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2) { if (val1.length != val2.length) { return false; } int result = 0; for (int i = 0; i < val1.length; i++) { result |= val1[i] ^ val2[i]; } return result == 0; } } | ByteArrayUtils { public static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2) { if (val1.length != val2.length) { return false; } int result = 0; for (int i = 0; i < val1.length; i++) { result |= val1[i] ^ val2[i]; } return result == 0; } } | ByteArrayUtils { public static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2) { if (val1.length != val2.length) { return false; } int result = 0; for (int i = 0; i < val1.length; i++) { result |= val1[i] ^ val2[i]; } return result == 0; } static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2); s... | ByteArrayUtils { public static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2) { if (val1.length != val2.length) { return false; } int result = 0; for (int i = 0; i < val1.length; i++) { result |= val1[i] ^ val2[i]; } return result == 0; } static boolean isEqualUsingConstantTime(byte[] val1, byte[] val2); s... |
@Test(expected = NullPointerException.class) public void testRemoveRouteNull() { try { this.routingTable.removeRoute(null); } catch (NullPointerException e) { throw e; } } | @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... |
@Test public void testRemoveRoute() { final Route route = this.constructTestRoute(GLOBAL_PREFIX); this.routingTable.removeRoute(route.routePrefix()); verify(interledgerPrefixMapMock).removeEntry(route.routePrefix()); verifyNoMoreInteractions(interledgerPrefixMapMock); } | @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> removeRoute(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.removeEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPr... |
@Test(expected = NullPointerException.class) public void testGetRoutesNull() { try { this.routingTable.getRouteByPrefix(null); } catch (NullPointerException e) { throw e; } } | @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... |
@Test public void testGetRoutes() { final Route route = this.constructTestRoute(GLOBAL_PREFIX); this.routingTable.getRouteByPrefix(route.routePrefix()); verify(interledgerPrefixMapMock).getEntry(route.routePrefix()); verifyNoMoreInteractions(interledgerPrefixMapMock); } | @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> getRouteByPrefix(final InterledgerAddressPrefix addressPrefix) { Objects.requireNonNull(addressPrefix); return this.interledgerAddressPrefixMap.getEntry(addressPrefix); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddress... |
@Test(expected = NullPointerException.class) public void testForEachNull() { try { this.routingTable.forEach(null); } catch (NullPointerException e) { throw e; } } | @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... |
@Test public void testForEach() { final BiConsumer<String, Collection<Route>> action = (o, o2) -> { }; this.routingTable.forEach(action); verify(interledgerPrefixMapMock).forEach(action); verifyNoMoreInteractions(interledgerPrefixMapMock); } | @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... | InMemoryRoutingTable implements RoutingTable<R> { @Override public void forEach(final BiConsumer<InterledgerAddressPrefix, R> action) { Objects.requireNonNull(action); this.interledgerAddressPrefixMap.forEach(action); } InMemoryRoutingTable(); InMemoryRoutingTable(final InterledgerAddressPrefixMap interledgerAddressPr... |
@Test(expected = NullPointerException.class) public void testFindNextHopRouteNull() { try { this.routingTable.findNextHopRoute(null); } catch (NullPointerException e) { throw e; } } | @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... |
@Test public void testFindNextHopRoute() { this.routingTable.findNextHopRoute(BOB_GLOBAL_ADDRESS); verify(interledgerPrefixMapMock).findNextHop(BOB_GLOBAL_ADDRESS); verifyNoMoreInteractions(interledgerPrefixMapMock); } | @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } } | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... | InMemoryRoutingTable implements RoutingTable<R> { @Override public Optional<R> findNextHopRoute(final InterledgerAddress interledgerAddress) { Objects.requireNonNull(interledgerAddress, "finalDestinationAddress must not be null!"); return this.interledgerAddressPrefixMap.findNextHop(interledgerAddress); } InMemoryRouti... |
@Test public void peersAndParentsGetsAutoRegisteredForCcp() { LinkType ilpoverhttp = LinkType.of("ILPOVERHTTP"); AccountSettings peer = AccountSettings.builder() .assetCode("XRP") .assetScale(9) .linkType(ilpoverhttp) .accountId(AccountId.of("peer")) .accountRelationship(AccountRelationship.PEER) .build(); AccountSetti... | @Override public void start() { this.initRoutingTables(); } | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } } | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... |
@Test public void misconfiguredAccountsAreGracefullyHandled() { LinkType ilpoverhttp = LinkType.of("ILPOVERHTTP"); AccountSettings goodPeer = AccountSettings.builder() .assetCode("XRP") .assetScale(9) .linkType(ilpoverhttp) .accountId(AccountId.of("good_peer")) .accountRelationship(AccountRelationship.PEER) .build(); A... | @Override public void start() { this.initRoutingTables(); } | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } } | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public void start() { this.initRoutingTables(); } InMemoryExternalRoutingService(
final EventBus eventBus,
final Supplier<ConnectorSettings> connectorSettingsSupplier,
final Decryptor decryptor,
final AccountSettingsRepository ... |
@Test public void migrateOnlyCallsStop() throws InterruptedException { System.setProperty(SPRING_PROFILES_ACTIVE, "migrate-only,test"); System.setProperty(SERVER_PORT, "0"); connectorServer.start(); assertThat(connectorServer.getContext().isActive()).isFalse(); } | @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only profile. Shutting down. !!!"); Sy... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... |
@Test public void testFindBestNexHopFromLocalPaymentRouter() { final Route routeMock = mock(Route.class); when(localDestinationAddressPaymentRouter.findBestNexHop(any())).thenReturn(Optional.of(routeMock)); final Optional<Route> actual = service.findBestNexHop(InterledgerAddress.of("example.foo.bar")); assertThat(actua... | @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNullable) .orElseGet(() -> localRoutingTable.findNextHopRoute(finalDes... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... |
@Test public void testFindBestNexHopFromForwardingPaymentRouter() { final Route routeMock = mock(Route.class); when(localDestinationAddressPaymentRouter.findBestNexHop(any())).thenReturn(Optional.empty()); when(localRoutingTableMock.findNextHopRoute(any())).thenReturn(Optional.of(routeMock)); final Optional<Route> actu... | @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNullable) .orElseGet(() -> localRoutingTable.findNextHopRoute(finalDes... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... |
@Test public void testFindBestNexHopWhenBothTablesAreEmpty() { when(localDestinationAddressPaymentRouter.findBestNexHop(any())).thenReturn(Optional.empty()); when(localRoutingTableMock.findNextHopRoute(any())).thenReturn(Optional.empty()); final Optional<Route> actual = service.findBestNexHop(InterledgerAddress.of("exa... | @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNullable) .orElseGet(() -> localRoutingTable.findNextHopRoute(finalDes... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... | InMemoryExternalRoutingService implements ExternalRoutingService { @Override public Optional<Route> findBestNexHop(final InterledgerAddress finalDestinationAddress) { Objects.requireNonNull(finalDestinationAddress); return localDestinationAddressPaymentRouter.findBestNexHop(finalDestinationAddress) .map(Optional::ofNul... |
@Test public void merge() { AccountId accountId = AccountId.of(generateUuid()); String streamPaymentId = generateUuid(); String streamPaymentId2 = generateUuid(); final StreamPayment entity1 = newTransaction(accountId, streamPaymentId, 10); paymentTransactionManager.merge(entity1); final StreamPayment loadedAccessToken... | @Override public synchronized void merge(StreamPayment streamPayment) { StreamPayment merged = upsertAmounts(streamPayment); if (streamPayment.deliveredAssetCode().isPresent()) { merged = put(StreamPayment.builder().from(merged) .deliveredAssetCode(streamPayment.deliveredAssetCode()) .deliveredAssetScale(streamPayment.... | InMemoryStreamPaymentManager implements StreamPaymentManager { @Override public synchronized void merge(StreamPayment streamPayment) { StreamPayment merged = upsertAmounts(streamPayment); if (streamPayment.deliveredAssetCode().isPresent()) { merged = put(StreamPayment.builder().from(merged) .deliveredAssetCode(streamPa... | InMemoryStreamPaymentManager implements StreamPaymentManager { @Override public synchronized void merge(StreamPayment streamPayment) { StreamPayment merged = upsertAmounts(streamPayment); if (streamPayment.deliveredAssetCode().isPresent()) { merged = put(StreamPayment.builder().from(merged) .deliveredAssetCode(streamPa... | InMemoryStreamPaymentManager implements StreamPaymentManager { @Override public synchronized void merge(StreamPayment streamPayment) { StreamPayment merged = upsertAmounts(streamPayment); if (streamPayment.deliveredAssetCode().isPresent()) { merged = put(StreamPayment.builder().from(merged) .deliveredAssetCode(streamPa... | InMemoryStreamPaymentManager implements StreamPaymentManager { @Override public synchronized void merge(StreamPayment streamPayment) { StreamPayment merged = upsertAmounts(streamPayment); if (streamPayment.deliveredAssetCode().isPresent()) { merged = put(StreamPayment.builder().from(merged) .deliveredAssetCode(streamPa... |
@Test public void convertPaymentReceived() { long amount = 100; StreamPacket streamPacket = StreamPacket.builder() .interledgerPacketType(InterledgerPacketType.PREPARE) .sequence(UnsignedLong.ONE) .prepareAmount(UnsignedLong.valueOf(10)) .addFrames(moneyFrame()) .build(); FulfillmentGeneratedEvent event = FulfillmentGe... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void convertPaymentReceivedWithoutTypedData() { long amount = 100; FulfillmentGeneratedEvent event = FulfillmentGeneratedEvent.builder() .preparePacket(preparePacket(amount, Optional.empty())) .accountId(ACCOUNT_ID) .denomination(DENOMINATION) .paymentType(StreamPaymentType.PAYMENT_RECEIVED) .fulfillPacket... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void convertWithClosingFrameOnPrepare() { long amount = 100; StreamPacket streamPacket = StreamPacket.builder() .interledgerPacketType(InterledgerPacketType.PREPARE) .sequence(UnsignedLong.ONE) .prepareAmount(UnsignedLong.valueOf(10)) .addFrames(moneyFrame()) .addFrames(closeFrame()) .build(); FulfillmentG... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void convertWithClosingFrameOnFulfill() { long amount = 100; StreamPacket streamPacket = StreamPacket.builder() .interledgerPacketType(InterledgerPacketType.PREPARE) .sequence(UnsignedLong.ONE) .prepareAmount(UnsignedLong.valueOf(10)) .addFrames(moneyFrame()) .build(); StreamPacket streamResponsePacket = S... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void convertWithConnectionNewAddressFrame() { long amount = 100; InterledgerAddress source = InterledgerAddress.of("test.source"); StreamPacket streamPacket = StreamPacket.builder() .interledgerPacketType(InterledgerPacketType.PREPARE) .sequence(UnsignedLong.ONE) .prepareAmount(UnsignedLong.valueOf(10)) .a... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void convertPaymentSentWithSharedSecret() { SharedSecret sharedSecret = SharedSecret.of(ByteArrayUtils.generate32RandomBytes()); UnsignedLong sentAmount = UnsignedLong.valueOf(20); UnsignedLong deliveredAmount = UnsignedLong.valueOf(15); StreamPacket streamPreparePacket = StreamPacket.builder() .interledge... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void serverActiveAfterStart() { System.setProperty(SPRING_PROFILES_ACTIVE, "test"); System.setProperty(SERVER_PORT, "0"); connectorServer.start(); assertThat(connectorServer.getContext().isActive()).isTrue(); } | @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only profile. Shutting down. !!!"); Sy... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... | ConnectorServer extends Server { @Override public void start() { super.start(); if (SpringProfileUtils.isProfileActive(getContext().getEnvironment(), "MIGRATE-ONLY")) { System.out.println("###################################################################"); System.out.println("!!! Container started with migrate-only ... |
@Test public void convertPaymentSentWithTypedData() { SharedSecret sharedSecret = SharedSecret.of(ByteArrayUtils.generate32RandomBytes()); UnsignedLong sentAmount = UnsignedLong.valueOf(20); UnsignedLong deliveredAmount = UnsignedLong.valueOf(20); StreamPacket streamPreparePacket = StreamPacket.builder() .interledgerPa... | @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillStreamPacket = streamFulfillPacket(source.preparePacket(), source.fulfillPacket()); Optional<Interled... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @Override public StreamPayment convert(FulfillmentGeneratedEvent source) { Optional<StreamPacket> prepareStreamPacket = streamPreparePacket(source.preparePacket(), source.fulfillPacket()); Optional<StreamPacket> fulfillS... |
@Test public void findSharedSecretInIlpPackets() { final SharedSecret sharedSecret1 = SharedSecret.of(ByteArrayUtils.generate32RandomBytes()); final SharedSecret sharedSecret2 = SharedSecret.of(ByteArrayUtils.generate32RandomBytes()); final SharedSecret sharedSecret3 = SharedSecret.of(ByteArrayUtils.generate32RandomByt... | @VisibleForTesting protected Optional<SharedSecret> getSharedSecret(InterledgerPacket... packets) { return Lists.newArrayList(packets).stream() .map(InterledgerPacket::typedData) .filter(Optional::isPresent) .map(Optional::get) .filter(typedData -> typedData instanceof StreamPacket) .map(typedData -> (StreamPacket) typ... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @VisibleForTesting protected Optional<SharedSecret> getSharedSecret(InterledgerPacket... packets) { return Lists.newArrayList(packets).stream() .map(InterledgerPacket::typedData) .filter(Optional::isPresent) .map(Optiona... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @VisibleForTesting protected Optional<SharedSecret> getSharedSecret(InterledgerPacket... packets) { return Lists.newArrayList(packets).stream() .map(InterledgerPacket::typedData) .filter(Optional::isPresent) .map(Optiona... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @VisibleForTesting protected Optional<SharedSecret> getSharedSecret(InterledgerPacket... packets) { return Lists.newArrayList(packets).stream() .map(InterledgerPacket::typedData) .filter(Optional::isPresent) .map(Optiona... | FulfillmentGeneratedEventConverter implements Converter<FulfillmentGeneratedEvent, StreamPayment> { @VisibleForTesting protected Optional<SharedSecret> getSharedSecret(InterledgerPacket... packets) { return Lists.newArrayList(packets).stream() .map(InterledgerPacket::typedData) .filter(Optional::isPresent) .map(Optiona... |
@Test public void findByAccountIdAndStreamPaymentId() { StreamPayment trx1 = transactionBuilder().build(); when(mockRepo.findByAccountIdAndStreamPaymentId(trx1.accountId(), trx1.streamPaymentId())) .thenReturn(Optional.of(streamPaymentToEntityConverter.convert(trx1))); assertThat(transactionManager.findByAccountIdAndSt... | @Override public Optional<StreamPayment> findByAccountIdAndStreamPaymentId(AccountId accountId, String streamPaymentId) { return streamPaymentsRepository.findByAccountIdAndStreamPaymentId(accountId, streamPaymentId) .map(streamPaymentFromEntityConverter::convert); } | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public Optional<StreamPayment> findByAccountIdAndStreamPaymentId(AccountId accountId, String streamPaymentId) { return streamPaymentsRepository.findByAccountIdAndStreamPaymentId(accountId, streamPaymentId) .map(streamPaymentFromEntityConverter::... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public Optional<StreamPayment> findByAccountIdAndStreamPaymentId(AccountId accountId, String streamPaymentId) { return streamPaymentsRepository.findByAccountIdAndStreamPaymentId(accountId, streamPaymentId) .map(streamPaymentFromEntityConverter::... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public Optional<StreamPayment> findByAccountIdAndStreamPaymentId(AccountId accountId, String streamPaymentId) { return streamPaymentsRepository.findByAccountIdAndStreamPaymentId(accountId, streamPaymentId) .map(streamPaymentFromEntityConverter::... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public Optional<StreamPayment> findByAccountIdAndStreamPaymentId(AccountId accountId, String streamPaymentId) { return streamPaymentsRepository.findByAccountIdAndStreamPaymentId(accountId, streamPaymentId) .map(streamPaymentFromEntityConverter::... |
@Test public void findByAccountId() { StreamPayment trx1 = transactionBuilder().build(); StreamPayment trx2 = transactionBuilder().build(); when(mockRepo.findByAccountIdOrderByCreatedDateDesc(eq(trx1.accountId()), any())) .thenReturn(Lists.newArrayList(streamPaymentToEntityConverter.convert(trx1), streamPaymentToEntity... | @Override public List<StreamPayment> findByAccountId(AccountId accountId, PageRequest pageRequest) { return streamPaymentsRepository.findByAccountIdOrderByCreatedDateDesc(accountId, pageRequest) .stream() .map(streamPaymentFromEntityConverter::convert) .collect(Collectors.toList()); } | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public List<StreamPayment> findByAccountId(AccountId accountId, PageRequest pageRequest) { return streamPaymentsRepository.findByAccountIdOrderByCreatedDateDesc(accountId, pageRequest) .stream() .map(streamPaymentFromEntityConverter::convert) .c... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public List<StreamPayment> findByAccountId(AccountId accountId, PageRequest pageRequest) { return streamPaymentsRepository.findByAccountIdOrderByCreatedDateDesc(accountId, pageRequest) .stream() .map(streamPaymentFromEntityConverter::convert) .c... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public List<StreamPayment> findByAccountId(AccountId accountId, PageRequest pageRequest) { return streamPaymentsRepository.findByAccountIdOrderByCreatedDateDesc(accountId, pageRequest) .stream() .map(streamPaymentFromEntityConverter::convert) .c... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public List<StreamPayment> findByAccountId(AccountId accountId, PageRequest pageRequest) { return streamPaymentsRepository.findByAccountIdOrderByCreatedDateDesc(accountId, pageRequest) .stream() .map(streamPaymentFromEntityConverter::convert) .c... |
@Test public void mergePending() { StreamPayment trx = transactionBuilder().build(); transactionManager.merge(trx); verify(mockRepo, times(1)).upsertAmounts(streamPaymentToEntityConverter.convert(trx)); verifyNoMoreInteractions(mockRepo); } | @Override public void merge(StreamPayment streamPayment) { streamPaymentsRepository.upsertAmounts(streamPaymentToEntityConverter.convert(streamPayment)); streamPayment.sourceAddress().ifPresent(sourceAddress -> { streamPaymentsRepository.updateSourceAddress(streamPayment.accountId(), streamPayment.streamPaymentId(), so... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public void merge(StreamPayment streamPayment) { streamPaymentsRepository.upsertAmounts(streamPaymentToEntityConverter.convert(streamPayment)); streamPayment.sourceAddress().ifPresent(sourceAddress -> { streamPaymentsRepository.updateSourceAddre... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public void merge(StreamPayment streamPayment) { streamPaymentsRepository.upsertAmounts(streamPaymentToEntityConverter.convert(streamPayment)); streamPayment.sourceAddress().ifPresent(sourceAddress -> { streamPaymentsRepository.updateSourceAddre... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public void merge(StreamPayment streamPayment) { streamPaymentsRepository.upsertAmounts(streamPaymentToEntityConverter.convert(streamPayment)); streamPayment.sourceAddress().ifPresent(sourceAddress -> { streamPaymentsRepository.updateSourceAddre... | InDatabaseStreamPaymentManager implements StreamPaymentManager { @Override public void merge(StreamPayment streamPayment) { streamPaymentsRepository.upsertAmounts(streamPaymentToEntityConverter.convert(streamPayment)); streamPayment.sourceAddress().ifPresent(sourceAddress -> { streamPaymentsRepository.updateSourceAddre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.