Пример #1
0
 def test_map_carbon_selection_setting_with_data(self):
     mapper = model.get_mapper('confml')
     c1 = model.CarbonSelectionSetting("test")
     c2 = mapper.map_object(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlSelectionSetting))
     self.assertEquals(c2.name, None)
     self.assertEquals(c2.ref, "test")
Пример #2
0
 def test_map_carbon_configuration(self):
     mapper = model.get_mapper('confml')
     c1 = model.CarbonConfiguration("test")
     c2 = mapper.configuration(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlConfiguration))
     c2 = mapper.map_object(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlConfiguration))
Пример #3
0
 def test_map_carbon_featurelist(self):
     mapper = model.get_mapper('confml')
     c1 = model.FeatureList(name="test")
     c2 = mapper.configuration(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlConfiguration))
     c2 = mapper.map_object(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlConfiguration))
Пример #4
0
 def test_map_carbon_configuration_with_data(self):
     mapper = model.get_mapper('confml')
     c1 = model.CarbonConfiguration("test")
     c1.name = "test.confml"
     c1.namespace = "com.nokia"
     c2 = mapper.map_object(c1)
     self.assertTrue(isinstance(c2, confmlmodel.ConfmlConfiguration))
     self.assertEquals(c2.name, "test.confml")
     self.assertEquals(c2.namespace, "com.nokia")
     self.assertEquals(c2.path, "test")
Пример #5
0
 def test_get_mapper(self):
     mapper = model.get_mapper('confml')
     self.assertTrue(isinstance(mapper, mapping.Carbon2confml))