test_class.declarator: nodeMatcher
test_class.modifier: private
test_class.original_string: private INodeMatcherPlugin nodeMatcher;
test_class.type: INodeMatcherPlugin
test_class.var_name: nodeMatcher
test_class.declarator: computeNodeType
test_class.modifier: private
test_class.original_string: private NodeType computeNodeType;
test_class.type: NodeType
test_class.var_name: computeNodeType
test_class.declarator: computeNodeTemplate
test_class.modifier: private
test_class.original_string: private NodeTemplate computeNodeTemplate;
test_class.type: NodeTemplate
test_class.var_name: computeNodeTemplate
test_class.declarator: locationResources
test_class.modifier: private
test_class.original_string: private LocationResources locationResources;
test_class.type: LocationResources
test_class.var_name: locationResources
test_class.file: alien4cloud-core/src/test/java/alien4cloud/deployment/matching/services/nodes/DefaultNodeMatcherTest.java
test_class.identifier: DefaultNodeMatcherTest
test_case.body: @Test
      public void location_resource_should_be_matched_only_if_capabilities_are_satisfied() throws Exception {
          // Given
          CapabilityDefinition capabilityArchitecture = new CapabilityDefinition("tosca.capabilities.OperatingSystem");
          computeNodeType.setCapabilities(Arrays.asList(capabilityArchitecture));
  
          Capability capability = new Capability();
          capability.setType("tosca.capabilities.OperatingSystem");
          capability.setProperties(ImmutableMap.of("architecture", new ScalarPropertyValue("x86")));
          computeNodeTemplate.setCapabilities(ImmutableMap.of("os", capability));
  
          CapabilityType capabilityType = new CapabilityType();
          PropertyDefinition propertyDefinition = new PropertyDefinition();
          propertyDefinition.setType("string");
          capabilityType.setElementId("tosca.capabilities.OperatingSystem");
          capabilityType.setProperties(ImmutableMap.of("architecture", propertyDefinition));
          locationResources.setCapabilityTypes(ImmutableMap.of("tosca.capabilities.OperatingSystem", capabilityType));
  
          // Matching configuration
          Map<String, MatchingConfiguration> capabilityFilterConfiguration = new HashMap<>();
          MatchingConfiguration matchingConfiguration = new MatchingConfiguration();
          MatchingFilterDefinition matchingFilterDefinition = new MatchingConfiguration();
          matchingFilterDefinition.setProperties(ImmutableMap.of("architecture", Arrays.asList(new EqualConstraint())));
          matchingConfiguration.setCapabilities(ImmutableMap.of("os", matchingFilterDefinition));
          capabilityFilterConfiguration.put("org.alien4cloud.nodes.mock.aws.Compute", matchingConfiguration);
  
          // When
          NodeTemplate wantedNodeTemplate = new NodeTemplate();
          wantedNodeTemplate.setType("tosca.nodes.Compute");
          Capability wantedCapability = new Capability();
          wantedCapability.setType("tosca.capabilities.OperatingSystem");
          wantedCapability.setProperties(ImmutableMap.of("architecture", new ScalarPropertyValue("power_pc")));
          wantedNodeTemplate.setCapabilities(ImmutableMap.of("os", wantedCapability));
  
          NodeType nodeType = new NodeType();
  
          List<LocationResourceTemplate> proposition = nodeMatcher.matchNode(wantedNodeTemplate, nodeType, locationResources, capabilityFilterConfiguration);
  
          // Then
          assertThat(proposition).hasSize(0);
      }
test_case.class_method_signature: DefaultNodeMatcherTest.location_resource_should_be_matched_only_if_capabilities_are_satisfied()
test_case.full_signature: @Test public void location_resource_should_be_matched_only_if_capabilities_are_satisfied()
test_case.identifier: location_resource_should_be_matched_only_if_capabilities_are_satisfied
test_case.invocations: setCapabilities asList setType setProperties of setCapabilities of setType setElementId setProperties of setCapabilityTypes of setProperties of asList setCapabilities of put setType setType setProperties of setCapabilities of matchNode hasSize assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void location_resource_should_be_matched_only_if_capabilities_are_satisfied()
focal_class.file: alien4cloud-core/src/main/java/alien4cloud/deployment/matching/services/nodes/DefaultNodeMatcher.java
focal_class.identifier: DefaultNodeMatcher
focal_class.interfaces: implements INodeMatcherPlugin
focal_class.class_method_signature: DefaultNodeMatcher.matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_class.full_signature: public List<LocationResourceTemplate> matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_class.identifier: matchNode
focal_class.modifiers: public
focal_class.parameters: (NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_class.return: List<LocationResourceTemplate>
focal_class.signature: List<LocationResourceTemplate> matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_class.class_method_signature: DefaultNodeMatcher.typeSpecificMatching(NodeTemplate abstractTemplate, LocationResourceTemplate candidate, NodeType candidateType,
              LocationResources locationResources, MatchingConfiguration matchingConfiguration)
focal_class.full_signature: @Override protected boolean typeSpecificMatching(NodeTemplate abstractTemplate, LocationResourceTemplate candidate, NodeType candidateType,
              LocationResources locationResources, MatchingConfiguration matchingConfiguration)
focal_class.identifier: typeSpecificMatching
focal_class.modifiers: @Override protected
focal_class.parameters: (NodeTemplate abstractTemplate, LocationResourceTemplate candidate, NodeType candidateType,
              LocationResources locationResources, MatchingConfiguration matchingConfiguration)
focal_class.return: boolean
focal_class.signature: boolean typeSpecificMatching(NodeTemplate abstractTemplate, LocationResourceTemplate candidate, NodeType candidateType,
              LocationResources locationResources, MatchingConfiguration matchingConfiguration)
focal_class.superclass: extends AbstractTemplateMatcher<LocationResourceTemplate, NodeTemplate, NodeType>
focal_method.body: public List<LocationResourceTemplate> matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations) {
          return super.match(nodeTemplate, nodeType, locationResources.getNodeTemplates(), locationResources.getNodeTypes(), locationResources,
                  matchingConfigurations);
      }
focal_method.class_method_signature: DefaultNodeMatcher.matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_method.full_signature: public List<LocationResourceTemplate> matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_method.identifier: matchNode
focal_method.invocations: match getNodeTemplates getNodeTypes
focal_method.modifiers: public
focal_method.parameters: (NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)
focal_method.return: List<LocationResourceTemplate>
focal_method.signature: List<LocationResourceTemplate> matchNode(NodeTemplate nodeTemplate, NodeType nodeType, LocationResources locationResources,
              Map<String, MatchingConfiguration> matchingConfigurations)