Ignore:
Timestamp:
07/31/14 16:44:36 (10 years ago)
Author:
sherbold
Message:
  • fixed SOAP event types hashCode and equals method to account for the serviceName
  • added SimpleSOAPEventType that contains only the name of the called method and of the called service
  • added convertToSimpleSOAPEvent method to HTTPUtils
  • added tests for convertToSimpleSOAPEvent
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SOAPEventType.java

    r1622 r1635  
    4747     * </p> 
    4848     */ 
    49     transient private SOAPMessage soapRequest; 
     49    transient private final SOAPMessage soapRequest; 
    5050     
    5151    /** 
     
    5454     * </p> 
    5555     */ 
    56     transient private SOAPMessage soapResponse; 
     56    transient private final SOAPMessage soapResponse; 
    5757     
    5858    /** 
     
    6161     * </p> 
    6262     */ 
    63     private String calledMethod; 
     63    private final String calledMethod; 
    6464     
    6565    /** 
    6666     * <p> 
    6767     * the name of the service; this is either the path or, if a path map is available 
    68      */ 
    69     private String serviceName; 
     68     * </p> 
     69     */ 
     70    private final String serviceName; 
    7071     
    7172    /** 
     
    7475     * </p> 
    7576     */ 
    76     private String name; 
     77    private final String name; 
    7778 
    7879    /** 
     
    227228            return 
    228229                super.equals(obj) && 
    229                 HTTPUtils.equals(calledMethod, ((SOAPEventType) obj).calledMethod); 
     230                HTTPUtils.equals(calledMethod, ((SOAPEventType) obj).calledMethod) && 
     231                HTTPUtils.equals(serviceName, ((SOAPEventType) obj).serviceName); 
    230232        } 
    231233        else { 
     
    239241    @Override 
    240242    public int hashCode() { 
     243        int hashCode = super.hashCode(); 
    241244        if (calledMethod != null) { 
    242             return super.hashCode() + calledMethod.hashCode(); 
    243         } 
    244         else { 
    245             return super.hashCode(); 
    246         } 
     245            hashCode += calledMethod.hashCode(); 
     246        } 
     247        if( serviceName != null ) { 
     248            hashCode += serviceName.hashCode(); 
     249        } 
     250        return hashCode; 
    247251    } 
    248252 
Note: See TracChangeset for help on using the changeset viewer.