configurationengine/source/cone/public/tests/unittest_mapping.py
changeset 0 2e8eeb919028
child 3 e7e0ae78773e
equal deleted inserted replaced
-1:000000000000 0:2e8eeb919028
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 
       
    17 
       
    18 import unittest
       
    19 import string
       
    20 import sys
       
    21 import os
       
    22 import shutil
       
    23 import __init__
       
    24 
       
    25 from cone.public import api, exceptions, mapping
       
    26 
       
    27 class TestMapping(unittest.TestCase):
       
    28     def test_get_mapper(self):
       
    29         mapper = api.get_mapper('confml')
       
    30         self.assertTrue(isinstance(mapper, mapping.BaseMapper))
       
    31 
       
    32     def test_map_feature(self):
       
    33         fea = api.Feature("test")
       
    34         mapper = fea._get_mapper('confml')
       
    35         fea2 = mapper.map_object(fea)
       
    36         self.assertEquals(fea,fea2)