congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
MenuItemDescription.setName
Code IndexAdd Tabnine to your IDE (free)

How to use
setName
method
in
org.jbpm.form.builder.services.model.menu.MenuItemDescription

Best Java code snippets using org.jbpm.form.builder.services.model.menu.MenuItemDescription.setName (Showing top 4 results out of 315)

origin: org.jbpm/form-services

private void abstractTestSaveMenuItemProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  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.setIconUrl("https://www.google.com/images/srpr/logo3w.png");
  sampleDescription.setName("name");
  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 " + exceptionType.getName(), cause.getClass().equals(exceptionType));
  }
}
@Test
origin: org.jbpm/jbpm-form-services

private void abstractTestSaveMenuItemProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  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.setIconUrl("https://www.google.com/images/srpr/logo3w.png");
  sampleDescription.setName("name");
  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 " + exceptionType.getName(), cause.getClass().equals(exceptionType));
  }
}
@Test
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    
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    
org.jbpm.form.builder.services.model.menuMenuItemDescriptionsetName

Popular methods of MenuItemDescription

  • <init>
  • getDataMap
  • getName
  • setAllowedEvents
  • setDataMap
  • setEffects
  • setIconUrl
  • setItemRepresentationMap

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • IsNull (org.hamcrest.core)
    Is the value null?
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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