Examples of RequestTypeWithOptions


Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

  }

  @SuppressWarnings("unused")
  @Test
  public void testIncorrectOption() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    try {
      rt = new RequestTypeWithOptions("SetRequest setContact");
      assertTrue("Should have indicated missing class.", false);     
    } catch (DmcValueException e) {
      System.out.println("Expected exception: " + e.toString());
    }
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

  }
 
  @SuppressWarnings("unused")
  @Test
  public void testIncorrectOption2() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    try {
      rt = new RequestTypeWithOptions("SetRequest setContact CENTRALERRORS");
      assertTrue("Should have indicated missing class.", false);     
    } catch (DmcValueException e) {
      System.out.println("Expected exception: " + e.toString());
    }
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    }
  }
 
  @Test
  public void testValidOptions() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("SetRequest setContact Contact CENTRALERRORS DMPERRORS");
    assertEquals("Request type should be Set", "Set", rt.getRequestType());     
    assertEquals("Function should be setContact", "setContact", rt.getFunctionName());
    HashSet<RequestOptionEnum>  options = rt.getOptions();
   
    assertEquals("Should have 2 options", 2, options.size());
   
    assertEquals("Should have CONTRALERRORS option", true, options.contains(RequestOptionEnum.CENTRALERRORS));
   
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

  }

  @SuppressWarnings("unused")
  @Test
  public void testInvalidUnlessGetRequest1() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    try {
      rt = new RequestTypeWithOptions("SetRequest setContact CENTRALERRORS CACHE");
      assertTrue("Should have indicated invalid option.", false);     
    } catch (DmcValueException e) {
      System.out.println("Expected exception: " + e.toString());
    }
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

  }
 
  @SuppressWarnings("unused")
  @Test
  public void testInvalidUnlessGetRequest2() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    try {
      rt = new RequestTypeWithOptions("SetRequest setContact CENTRALERRORS EVENTS");
      assertTrue("Should have indicated invalid option.", false);     
    } catch (DmcValueException e) {
      System.out.println("Expected exception: " + e.toString());
    }
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    }
  }
 
  @Test
  public void testValidGetOptions() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("GetRequest getContact CENTRALERRORS CACHE EVENTS");
    assertEquals("Request type should be Get", "Get", rt.getRequestType());     
    assertEquals("Function should be getContact", "getContact", rt.getFunctionName());
    HashSet<RequestOptionEnum>  options = rt.getOptions();
   
    assertEquals("Should have 3 options", 3, options.size());
   
    assertEquals("Should have CACHE option", true, options.contains(RequestOptionEnum.CACHE));
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    assertEquals("Should have CACHE option", true, options.contains(RequestOptionEnum.CACHE));
  }

  @Test
  public void testFallbackToDefaultErrors() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("SetRequest setContact Contact");
    assertEquals("Request type should be Set", "Set", rt.getRequestType());   
    assertEquals("Function should be setContact", "setContact", rt.getFunctionName());
    HashSet<RequestOptionEnum>  options = rt.getOptions();
   
    assertNotNull("Should have options", options);
   
    assertEquals("Should have 2 options", 2, options.size());
   
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    assertEquals("Should have CENTRALRPCERRORS option", true, options.contains(RequestOptionEnum.CENTRALRPCERRORS));
  }

  @Test
  public void testFallbackToCentralRPCErrors() throws DmcValueException {
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("SetRequest setContact Contact DMPERRORS");
    assertEquals("Request type should be Set", "Set", rt.getRequestType());   
    assertEquals("Function should be setContact", "setContact", rt.getFunctionName());
    HashSet<RequestOptionEnum>  options = rt.getOptions();
   
    assertNotNull("Should have options", options);
   
    assertEquals("Should have 2 options", 2, options.size());
   
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    assertEquals("Should have CENTRALRPCERRORS option", true, options.contains(RequestOptionEnum.CENTRALRPCERRORS));
  }

  @Test
  public void testFallbackToCentralDMPErrors() throws DmcValueException {
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("SetRequest setContact Contact RPCERRORS");
    assertEquals("Request type should be Set", "Set", rt.getRequestType());   
    assertEquals("Function should be setContact", "setContact", rt.getFunctionName());
    HashSet<RequestOptionEnum>  options = rt.getOptions();
   
    assertNotNull("Should have options", options);
   
    assertEquals("Should have 2 options", 2, options.size());
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.