Tabnine Logo
RemoteApiTest
Code IndexAdd Tabnine to your IDE (free)

How to use
RemoteApiTest
in
org.kie.services.client.api

Best Java code snippets using org.kie.services.client.api.RemoteApiTest (Showing top 3 results out of 315)

origin: org.kie.remote/kie-services-client

@Test
public void reRequestTest() throws Exception { 
  String urlString = "http://localhost:8080/appBase/";
  URL appBaseUrl = new URL(urlString);
  ClientRequestFactory factory = new ClientRequestFactory(appBaseUrl.toURI());
    String pathAdd = "/j_security_check";
  ClientRequest formRequest = factory.createRelativeRequest(pathAdd);
  formRequest.formParameter("test", "test");
    assertEquals(urlString + pathAdd , formRequest.getUri());
}
origin: org.kie.remote/kie-remote-client

@Test
public void notAceptedMethodTest() throws Exception { 
  URL deploymentUrl = new URL( "http://localhost:8080/kie-wb/" );
  RemoteRestRuntimeEngineFactory restSessionFactory 
    = RemoteRuntimeEngineFactory.newRestBuilder()
      .addDeploymentId("deployment")
      .addUrl(deploymentUrl)
      .addUserName("mary")
      .addPassword("pass")
      .buildFactory();
  
  WorkItemHandler wih = new DoNothingWorkItemHandler();
  try { 
    restSessionFactory.newRuntimeEngine().getKieSession().getWorkItemManager().registerWorkItemHandler("test", wih);
    fail( "The above call should have failed.");
  } catch( UnsupportedOperationException uoe ) { 
    assertTrue("Incorrect error message: " + uoe.getMessage(), uoe.getMessage().contains("not supported on the Remote Client instance."));
  }
}

origin: org.kie.remote/kie-services-client

@Test
public void notAceptedMethodTest() throws Exception { 
  URL deploymentUrl = new URL( "http://localhost:8080/kie-wb/" );
  RemoteRestRuntimeEngineFactory restSessionFactory 
    = RemoteRestRuntimeEngineFactory.newBuilder()
      .addDeploymentId("deployment")
      .addUrl(deploymentUrl)
      .addUserName("mary")
      .addPassword("pass")
      .build();
  
  WorkItemHandler wih = new DoNothingWorkItemHandler();
  try { 
    restSessionFactory.newRuntimeEngine().getKieSession().getWorkItemManager().registerWorkItemHandler("test", wih);
    fail( "The above call should have failed.");
  } catch( UnsupportedOperationException uoe ) { 
    assertEquals("The .registerWorkItemHandler(..) method is not supported on the remote api.", uoe.getMessage());
  }
}

org.kie.services.client.apiRemoteApiTest

Most used methods

  • fail
  • assertEquals
  • assertTrue

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Path (java.nio.file)
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now