Package org.jbehave.jmock

Examples of org.jbehave.jmock.UsingJMockBehaviour$Interface


  testAssertionInterface1010(interfaces, errorReporter);
   
  int numInterfaces = interfaces.length;
  for(int i = 0; i < numInterfaces; i++)
  {
      Interface interfac = interfaces[i];
     
    testAssertionInterface1009(interfac, errorReporter);
   
    validateInterfaceOperations(interfac, interfac.getInterfaceOperations(), errorReporter);
  }
  }
View Full Code Here


   * @throws WSDLException
   */
  protected boolean testAssertionInterface1009(Interface interfac, ErrorReporter errorReporter) throws WSDLException
  {
  Interface[] extendedInterfaces = interfac.getExtendedInterfaces();
  Interface extendedInterface = containsInterface(interfac, extendedInterfaces);
  if(extendedInterface != null)
  {
    errorReporter.reportError(new ErrorLocatorImpl(), "Interface-1009", new Object[]{extendedInterface.getName()}, ErrorReporter.SEVERITY_ERROR);
    return false;
  }
  return true;
  }
View Full Code Here

   */
  protected boolean testAssertionBinding1044(Binding binding, ErrorReporter errorReporter) throws WSDLException
  {
  BindingOperation[] bindingOperations = binding.getBindingOperations();
  BindingFault[] bindingFaults = binding.getBindingFaults();
  Interface bindingInterface = binding.getInterface();
  if(((bindingOperations != null && bindingOperations.length > 0) ||
    (bindingFaults != null && bindingFaults.length > 0)) &&
     bindingInterface == null)
  {
    errorReporter.reportError(new ErrorLocatorImpl(), "Binding-1044", new Object[]{}, ErrorReporter.SEVERITY_ERROR);
View Full Code Here

  {
  boolean allInterfaceOperationsHaveBinding = true;
    QName bindingQN = binding.getName();
  String bindingName = bindingQN != null ? bindingQN.getLocalPart() : null;
 
  Interface interfac = binding.getInterface();
  if(interfac == null)
    return true;
 
  BindingOperation[] bindingOperations = binding.getBindingOperations();
  int numBindingOperations = bindingOperations.length;
  List usedInterfaceOperationList = new ArrayList();
  for(int i = 0; i < numBindingOperations; i++)
  {
    InterfaceOperation io = bindingOperations[i].getInterfaceOperation();
    if(io != null)
    usedInterfaceOperationList.add(io);
  }
    // Check the interface operations.
  if(!checkAllInterfaceOperationsHaveBinding(bindingName, interfac, usedInterfaceOperationList, errorReporter))
    allInterfaceOperationsHaveBinding = false;
 
  Interface[] extendedInterfaces = interfac.getExtendedInterfaces();
  if(extendedInterfaces != null)
  {
    int numExtendedInterfaces = extendedInterfaces.length;
    for(int i = 0; i < numExtendedInterfaces; i++)
      {
View Full Code Here

  Binding binding = endpoint.getBinding();
  // If no binding has been specified this assertion does not apply.
  if(binding == null)
    return true;
 
  Interface bindingInterface = binding.getInterface();
  WSDLComponent parent = endpoint.getParent();
  if(parent != null)
  {
    Service service = (Service)parent;
    Interface serviceInterface = service.getInterface();
   
    // If an interface hasn't been specified on the service this assertion doesn't apply.
    // If the binding interface is null this assertion passes.
    if(serviceInterface != null && bindingInterface != null && !serviceInterface.equals(bindingInterface))
    {
    errorReporter.reportError(new ErrorLocatorImpl(), "Endpoint-1062", new Object[]{binding, bindingInterface, serviceInterface}, ErrorReporter.SEVERITY_ERROR);
    return false
    }
  }
View Full Code Here

/**
  * Test that the imported interface matches the expected value parsed from the WSDL.
  */
public void testCheckWSDLImport()
{
     Interface interface1 = fInterfaces[0];
   
     assertEquals("Unexpected interface name.", "{http://example.com/bank}Bank", interface1.getName().toString());
}
View Full Code Here

/**
  * Test that the imported interface matches the expected value parsed from the WSDL.
  */
public void testCheckWSDLImport()
{
     Interface interface1 = fInterfaces[0];
   
     assertEquals("Unexpected interface name.", "{http://example.com/bank}Bank", interface1.getName().toString());
}
View Full Code Here

            Description desc = descElement.toComponent();
            // Check if the wsdl is only a port type
            // In these cases, only the port type is used, as the service name and endpoint name
            // are provided on the jbi endpoint
            if (desc.getInterfaces().length == 1 && desc.getServices().length == 0) {
                Interface itf = desc.getInterfaces()[0];
                QName interfaceName = itf.getName();
                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                serviceEndpoint.addInterface(interfaceName);
            } else {
                Service service = desc.getService(serviceEndpoint.getServiceName());
                if (service == null) {
View Full Code Here

        } else {
           wsdlService = services[0];
        }

        axisService.setName(wsdlService.getName().getLocalPart().toString());
        Interface serviceInterface = wsdlService.getInterface();
        axisService.addParameter(new Parameter(WSDL2Constants.INTERFACE_LOCAL_NAME, serviceInterface.getName().getLocalPart()));
        processInterface(serviceInterface);
        if (isCodegen) {
            axisService.setOperationsNameList(operationNames);
        }
        processEndpoints(serviceInterface);
View Full Code Here

            operationNames.add(interfaceOperations[i].getName());
        }

        Interface[] extendedInterfaces = serviceInterface.getExtendedInterfaces();
        for (int i = 0; i < extendedInterfaces.length; i++) {
            Interface extendedInterface = extendedInterfaces[i];
            processInterface(extendedInterface);
        }

    }
View Full Code Here

TOP

Related Classes of org.jbehave.jmock.UsingJMockBehaviour$Interface

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.