0
|
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 |
|
|
24 |
from cone.public import api, exceptions, mapping
|
|
25 |
|
|
26 |
class TestMapping(unittest.TestCase):
|
|
27 |
def test_get_mapper(self):
|
|
28 |
mapper = api.get_mapper('confml')
|
|
29 |
self.assertTrue(isinstance(mapper, mapping.BaseMapper))
|
|
30 |
|
|
31 |
def test_map_feature(self):
|
|
32 |
fea = api.Feature("test")
|
|
33 |
mapper = fea._get_mapper('confml')
|
|
34 |
fea2 = mapper.map_object(fea)
|
|
35 |
self.assertEquals(fea,fea2) |