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")
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))
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))
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")
def test_get_mapper(self): mapper = model.get_mapper('confml') self.assertTrue(isinstance(mapper, mapping.Carbon2confml))