Codota Logo
FormEncodingFactory.register
Code IndexAdd Codota to your IDE (free)

How to use
register
method
in
org.jbpm.form.builder.services.model.forms.FormEncodingFactory

Best Java code snippets using org.jbpm.form.builder.services.model.forms.FormEncodingFactory.register (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.jbpm/form-services

@Before
public void setUp() throws Exception {
  FormEncodingFactory.register(FormEncodingServerFactory.getEncoder(), FormEncodingServerFactory.getDecoder());
}

origin: org.jbpm/jbpm-form-services

@Before
public void setUp() throws Exception {
  FormEncodingFactory.register(FormEncodingServerFactory.getEncoder(), FormEncodingServerFactory.getDecoder());
}

origin: org.jbpm/jbpm-form-services

@Test
public void testListItemsEncodingProblem() throws Exception {
  FSMenuService service = createMockedService(null);
  FormRepresentationDecoder decoder = EasyMock.createMock(FormRepresentationDecoder.class);
  FormEncodingFactory.register(FormEncodingFactory.getEncoder(), decoder);
  FormEncodingException exception = new FormEncodingException("Something going wrong");
  EasyMock.expect(decoder.decodeMenuItemsMap(EasyMock.anyObject(String.class))).andThrow(exception).once();
  
  EasyMock.replay(decoder);
  try {
    service.listMenuItems();
    fail("listOptions shouldn't succeed");
  } catch (MenuServiceException e) {
    assertNotNull("e shouldn't be null", e);
    Throwable cause = e.getCause();
    assertNotNull("cause shouldn't be null", cause);
    assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
  }
  EasyMock.verify(decoder);
}
@Test
origin: org.jbpm/form-services

@Test
public void testListItemsEncodingProblem() throws Exception {
  FSMenuService service = createMockedService(null);
  FormRepresentationDecoder decoder = EasyMock.createMock(FormRepresentationDecoder.class);
  FormEncodingFactory.register(FormEncodingFactory.getEncoder(), decoder);
  FormEncodingException exception = new FormEncodingException("Something going wrong");
  EasyMock.expect(decoder.decodeMenuItemsMap(EasyMock.anyObject(String.class))).andThrow(exception).once();
  
  EasyMock.replay(decoder);
  try {
    service.listMenuItems();
    fail("listOptions shouldn't succeed");
  } catch (MenuServiceException e) {
    assertNotNull("e shouldn't be null", e);
    Throwable cause = e.getCause();
    assertNotNull("cause shouldn't be null", cause);
    assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
  }
  EasyMock.verify(decoder);
}
@Test
origin: org.jbpm/jbpm-form-services

  @Test
  public void testSaveMenuItemEncodingProblem() throws Exception {
    FSMenuService service = createMockedService(null);
    MenuItemDescription sampleDescription = new MenuItemDescription();
    sampleDescription.setAllowedEvents(new ArrayList<String>());
    sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
    FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
    sampleDescription.setItemRepresentationMap(item.getDataMap());
    sampleDescription.setName("name");
    FormRepresentationEncoder encoder = EasyMock.createMock(FormRepresentationEncoder.class);
    FormEncodingException exception = new FormEncodingException();
    @SuppressWarnings("unchecked")
    Map<String, List<MenuItemDescription>> anyObject = EasyMock.anyObject(Map.class);
    EasyMock.expect(encoder.encodeMenuItemsMap(anyObject)).andThrow(exception).once();
    FormEncodingFactory.register(encoder, FormEncodingFactory.getDecoder());
    
    EasyMock.replay(encoder);
    try {
      service.saveMenuItem("group", sampleDescription);
      fail("saveMenuItem shouldn't succeed");
    } catch (MenuServiceException e) {
      assertNotNull("e shouldn't be null", e);
      Throwable cause = e.getCause();
      assertNotNull("cause shouldn't be null", cause);
      assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
    }
    EasyMock.verify(encoder);
  }
// THIS TEST REQUIRES THE REAL GWT Components so it should be executed in the showcase    
origin: org.jbpm/form-services

  @Test
  public void testSaveMenuItemEncodingProblem() throws Exception {
    FSMenuService service = createMockedService(null);
    MenuItemDescription sampleDescription = new MenuItemDescription();
    sampleDescription.setAllowedEvents(new ArrayList<String>());
    sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
    FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
    sampleDescription.setItemRepresentationMap(item.getDataMap());
    sampleDescription.setName("name");
    FormRepresentationEncoder encoder = EasyMock.createMock(FormRepresentationEncoder.class);
    FormEncodingException exception = new FormEncodingException();
    @SuppressWarnings("unchecked")
    Map<String, List<MenuItemDescription>> anyObject = EasyMock.anyObject(Map.class);
    EasyMock.expect(encoder.encodeMenuItemsMap(anyObject)).andThrow(exception).once();
    FormEncodingFactory.register(encoder, FormEncodingFactory.getDecoder());
    
    EasyMock.replay(encoder);
    try {
      service.saveMenuItem("group", sampleDescription);
      fail("saveMenuItem shouldn't succeed");
    } catch (MenuServiceException e) {
      assertNotNull("e shouldn't be null", e);
      Throwable cause = e.getCause();
      assertNotNull("cause shouldn't be null", cause);
      assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
    }
    EasyMock.verify(encoder);
  }
// THIS TEST REQUIRES THE REAL GWT Components so it should be executed in the showcase    
org.jbpm.form.builder.services.model.formsFormEncodingFactoryregister

Popular methods of FormEncodingFactory

  • getDecoder
  • getEncoder

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now