diff -r 000000000000 -r 2e8eeb919028 configurationengine/source/cone/storage/tests/unittest_resource.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configurationengine/source/cone/storage/tests/unittest_resource.py Thu Mar 11 17:04:37 2010 +0200 @@ -0,0 +1,48 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +""" +Test Respource +""" +import unittest +import string +import sys,os +import __init__ + +from cone.public.api import Resource +from cone.storage.stringstorage import StringResource + +class TestResource(unittest.TestCase): + def setUp(self): + pass + + def test_create_resource(self): + res = Resource("","",None) + self.assertTrue(res) + +class TestStringResource(unittest.TestCase): + def setUp(self): + pass + + def test_create_stringresource_with_data(self): + res = StringResource("","","Test data") + self.assertTrue(res) + self.assertEqual(res.read(),"Test data") + + +if __name__ == '__main__': + unittest.main() +