Package org.apache.olingo.odata2.testutil.server

Examples of org.apache.olingo.odata2.testutil.server.TestServer


   * This Unit is supposed to test the building of Entity Provider Properties for query with $expand
   */
  @Test
  public void testGetEntityProviderPropertiesQuery() {
    GetEntitySetUriInfo getEntitySetUriInfo = mockEntitySetUriInfoForExpand();
    ODataJPAContext oDataJPAContext = getODataJPAContext();
    // Building the edm entity
    List<Map<String, Object>> edmEntityList = new ArrayList<Map<String, Object>>();
    Map<String, Object> edmEntity = new HashMap<String, Object>();
    edmEntity.put("ID", 1);
    edmEntityList.add(edmEntity);
View Full Code Here


  @Test
  public void testGetEntityProviderPropertiesRead() {

    // Getting the EntityUriInfo
    GetEntityUriInfo getEntityUriInfo = mockEntityUriInfoForExpand();
    ODataJPAContext oDataJPAContext = getODataJPAContext();
    Class<?> clazz = ODataJPAResponseBuilderDefault.class;
    Object[] actualParameters = { oDataJPAContext, getEntityUriInfo };
    Class<?>[] formalParameters = { ODataJPAContext.class, GetEntityUriInfo.class };
    EntityProviderWriteProperties providerProperties = null;
    try {
View Full Code Here

    }
    assertNotNull(objODataResponse);
  }

  private ODataJPAContext getODataJPAContext() {
    ODataJPAContext objODataJPAContext = EasyMock.createMock(ODataJPAContext.class);
    EasyMock.expect(objODataJPAContext.getODataContext()).andStubReturn(getLocalODataContext());
    EasyMock.expect(objODataJPAContext.getPageSize()).andReturn(10);
    EasyMock.expect(objODataJPAContext.getPaging()).andReturn(mockJPAPaging()).anyTimes();
    EasyMock.replay(objODataJPAContext);
    return objODataJPAContext;
  }
View Full Code Here

  private ODataService service;

  private final HttpClient httpClient = new DefaultHttpClient();

  public AbstractFitTest(final ServletType servletType) {
    server = new TestServer(this.getClass().getSimpleName(), servletType);
  }
View Full Code Here

  private TestServer server1;
  private TestServer server2;

  @Before
  public void before() {
    server1 = new TestServer("/service1", ServletType.JAXRS_SERVLET);
    server2 = new TestServer("/service2", ServletType.JAXRS_SERVLET);

    server1.setPathSplit(0);
    server2.setPathSplit(0);

    server1.startServer(CxfCacheUriInfoIssueService1Factory.class, 19000);
View Full Code Here

  public MappingTest(final ServletType servletType) {
    super(servletType);
  }

  public static void main(final String[] args) {
    final TestServer server = new TestServer(ServletType.JAXRS_SERVLET);
    try {
      server.startServer(MapFactory.class);
      System.out.println("Press any key to exit");
      new BufferedReader(new InputStreamReader(System.in)).readLine();
    } catch (final IOException e) {
      e.printStackTrace(System.err);
    } finally {
      server.stopServer();
    }
  }
View Full Code Here

  private ServletType servletType;

  public AbstractFitTest(ServletType servletType) {
    this.servletType = servletType;
    server = new TestServer(this.getClass().getSimpleName(), servletType);
  }
View Full Code Here

*/
public class MappingTest extends AbstractFitTest {

  public static void main(final String[] args) {
    final TestServer server = new TestServer();
    try {
      server.startServer(MapFactory.class);
      System.out.println("Press any key to exit");
      new BufferedReader(new InputStreamReader(System.in)).readLine();
    } catch (final IOException e) {
      e.printStackTrace(System.err);
    } finally {
      server.stopServer();
    }
  }
View Full Code Here

  private ODataService service;

  private final HttpClient httpClient = new DefaultHttpClient();

  public AbstractFitTest() {
    server = new TestServer(this.getClass().getSimpleName());
  }
View Full Code Here

  private TestServer server1;
  private TestServer server2;

  @Before
  public void before() {
    server1 = new TestServer("/service1");
    server2 = new TestServer("/service2");

    server1.setPathSplit(0);
    server2.setPathSplit(0);

    server1.startServer(CxfCacheUriInfoIssueService1Factory.class, 19000);
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.testutil.server.TestServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.