Beispiel #1
0
 def parameter_test(self):
     """Test the parameter element."""
     self._compare(
         XMLGenerator.create_parameter("ParameterName",
                                       "ParameterType",
                                       "ParameterDirection"),
         '<arg '
         'direction="ParameterDirection" '
         'name="ParameterName" '
         'type="ParameterType" />')
Beispiel #2
0
 def property_test(self):
     """Test the property element."""
     self._compare(
         XMLGenerator.create_property("PropertyName",
                                      "PropertyType",
                                      "PropertyAccess"),
         '<property '
         'access="PropertyAccess" '
         'name="PropertyName" '
         'type="PropertyType" />'
     )
Beispiel #3
0
 def signal_test(self):
     """Test the signal element."""
     element = XMLGenerator.get_signal_element("SignalName")
     xml = '<signal name="SignalName" />'
     self._compare(element, xml)
Beispiel #4
0
 def method_test(self):
     """Test the method element."""
     element = XMLGenerator.get_method_element("MethodName")
     xml = '<method name="MethodName" />'
     self._compare(element, xml)
Beispiel #5
0
 def interface_test(self):
     """Test the interface element."""
     self._compare(
         XMLGenerator.get_interface_element("InterfaceName"),
         '<interface name="InterfaceName" />'
     )
Beispiel #6
0
 def node_test(self):
     """Test the node element."""
     self._compare(XMLGenerator.get_node_element(), '<node />')
Beispiel #7
0
 def _compare(self, element, xml):
     compare_xml(self, XMLGenerator.element_to_xml(element), xml)
Beispiel #8
0
 def _compare(self, element, xml):
     self.assertEqual(XMLGenerator.element_to_xml(element), xml)