Brett Chabot | 34fb7f6 | 2009-10-21 11:16:42 -0700 | [diff] [blame] | 1 | #!/usr/bin/python2.4 |
| 2 | # |
| 3 | # |
| 4 | # Copyright 2009, The Android Open Source Project |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | |
| 18 | import sys |
| 19 | import unittest |
| 20 | sys.path.append('../..') |
| 21 | |
| 22 | from testrunner import android_manifest |
| 23 | |
| 24 | |
| 25 | class AndroidManifestTest(unittest.TestCase): |
| 26 | """Unit tests for AndroidManifest.""" |
| 27 | |
| 28 | def setUp(self): |
| 29 | """Create android_mainfest for testing from sample file.""" |
| 30 | self._manifest = android_manifest.AndroidManifest(app_path='.') |
| 31 | |
| 32 | def testGetPackageName(self): |
| 33 | self.assertEquals('com.example.android.tests', |
| 34 | self._manifest.GetPackageName()) |
| 35 | |
| 36 | def testGetInstrumentationNames(self): |
| 37 | self.assertEquals(['android.test.InstrumentationTestRunner'], |
| 38 | self._manifest.GetInstrumentationNames()) |
| 39 | |
| 40 | |
| 41 | if __name__ == '__main__': |
| 42 | unittest.main() |