Package org.apache.aries.application.modelling

Examples of org.apache.aries.application.modelling.WrappedServiceMetadata


    // let's test that differsOnlyByName() works
    int serviceMatchesFound = 0;
    for (WrappedServiceMetadata result : services) {
      Iterator<WrappedServiceMetadata> it = expectedServices.iterator();
      while (it.hasNext()) {
        WrappedServiceMetadata next = it.next();
        if (result.equals(next) || result.identicalOrDiffersOnlyByName(next)) {
          serviceMatchesFound++;
          it.remove();
        }
      }
View Full Code Here


    ParsedServiceElements bpelem = _parserProxy.parseAllServiceElements(fis);
    services.addAll(bpelem.getServices());
   
    assertEquals ("Multi valued service not parsed correctly", services.size(), 1);
   
    WrappedServiceMetadata wsm = services.get(0);
    Map<String, Object> props = wsm.getServiceProperties();
    String [] intents = (String[]) props.get("service.intents");
   
    assertEquals ("Service.intents[0] wrong", intents[0], "propagatesTransaction");
    assertEquals ("Service.intents[1] wrong", intents[1], "confidentiality");
   
View Full Code Here

    //   public ExportedService (String name, int ranking, Collection<String> ifaces,
    // Map<String, String> serviceProperties ) {
    Map<String, Object> props = new HashMap<String, Object>();
    props.put ("away", "www.away.com");
    props.put ("home", "www.home.net");
    WrappedServiceMetadata wsm1 = new ExportedServiceImpl (null, 0, Arrays.asList("a.b.c", "d.e.f"), props);
    WrappedServiceMetadata wsm2 = new ExportedServiceImpl (null, 0, Arrays.asList("d.e.f", "a.b.c"), props);
   
    assertTrue ("Basic equality test", wsm1.equals(wsm2));
    assertTrue ("Basic equality test", wsm2.equals(wsm1));
    assertTrue ("Hashcodes equal", wsm1.hashCode() == wsm2.hashCode());

   
       
    wsm2 = new ExportedServiceImpl (null, 0, Arrays.asList("d.e.f", "a.b.c", "g.e.f"), props);
    assertFalse ("Adding an interface makes them different", wsm1.equals(wsm2));
    assertFalse ("Adding an interface makes them different", wsm2.equals(wsm1));
    assertFalse ("Hashcodes should differ", wsm1.hashCode() == wsm2.hashCode());
   
    props = new HashMap<String, Object>(props);
    props.put("interim", "w3.interim.org");
   
    wsm1 = new ExportedServiceImpl (null, 0, Arrays.asList("a.b.c","d.e.f", "g.e.f"), props);
   
    assertFalse ("Adding a service property makes them different", wsm1.equals(wsm2));
    assertFalse ("Adding a service property makes them different", wsm2.equals(wsm1));
    assertFalse ("Hashcodes still different", wsm1.hashCode() == wsm2.hashCode());
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.application.modelling.WrappedServiceMetadata

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.