From 33c9f97e1e7e2bbeeaedc4583b2d69a41d154a46 Mon Sep 17 00:00:00 2001 From: rzaitov Date: Wed, 30 Oct 2013 19:34:27 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BE=D1=82=20=D0=BD=D0=B5=D0=BD=D1=83=D0=B6?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/UnitTests/ProjectSettings/__init__.py | 1 - .../ProjectSettings/test_AttribueSettings.py | 15 --------------- .../ProjectSettings/test_keyValueSetting.py | 19 ------------------- scripts/parser/ProjectParser/Project.py | 7 ------- .../ProjectSetting/AttribureSetting.py | 15 --------------- .../ProjectSetting/CsprojSettingBase.py | 10 ---------- .../ProjectSetting/KeyValueSetting.py | 15 --------------- .../ProjectParser/ProjectSetting/__init__.py | 1 - 8 files changed, 83 deletions(-) delete mode 100644 scripts/UnitTests/ProjectSettings/__init__.py delete mode 100644 scripts/UnitTests/ProjectSettings/test_AttribueSettings.py delete mode 100644 scripts/UnitTests/ProjectSettings/test_keyValueSetting.py delete mode 100644 scripts/parser/ProjectParser/Project.py delete mode 100644 scripts/parser/ProjectParser/ProjectSetting/AttribureSetting.py delete mode 100644 scripts/parser/ProjectParser/ProjectSetting/CsprojSettingBase.py delete mode 100644 scripts/parser/ProjectParser/ProjectSetting/KeyValueSetting.py delete mode 100644 scripts/parser/ProjectParser/ProjectSetting/__init__.py diff --git a/scripts/UnitTests/ProjectSettings/__init__.py b/scripts/UnitTests/ProjectSettings/__init__.py deleted file mode 100644 index cc31abc..0000000 --- a/scripts/UnitTests/ProjectSettings/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'rzaitov' diff --git a/scripts/UnitTests/ProjectSettings/test_AttribueSettings.py b/scripts/UnitTests/ProjectSettings/test_AttribueSettings.py deleted file mode 100644 index 65a73bf..0000000 --- a/scripts/UnitTests/ProjectSettings/test_AttribueSettings.py +++ /dev/null @@ -1,15 +0,0 @@ -import unittest -from parser.ProjectParser.Project import Project -from parser.ProjectParser.ProjectSetting.AttribureSetting import AttributeSetting - - -class TestCase(unittest.TestCase): - def setUp(self): - self.csproj = Project('appName') - - def test_apply(self): - attr_value = 'parent_dir/child_dir' - setting = AttributeSetting('rel_path', attr_value) - - setting.apply(self.csproj) - self.assertEqual(self.csproj.rel_path, attr_value) diff --git a/scripts/UnitTests/ProjectSettings/test_keyValueSetting.py b/scripts/UnitTests/ProjectSettings/test_keyValueSetting.py deleted file mode 100644 index dd3f4c6..0000000 --- a/scripts/UnitTests/ProjectSettings/test_keyValueSetting.py +++ /dev/null @@ -1,19 +0,0 @@ -import unittest -from parser.ProjectParser.Project import Project -from parser.ProjectParser.ProjectSetting.KeyValueSetting import KeyValueSetting - - -class TestCase(unittest.TestCase): - def setUp(self): - self.csproj = Project('appName') - - def test_apply(self): - - key = 'some_key' - value = 'somve_value' - setting = KeyValueSetting(key, value) - - self.assertDictEqual(self.csproj.settings, {}) - - setting.apply(self.csproj) - self.assertDictEqual(self.csproj.settings, {key: value}) diff --git a/scripts/parser/ProjectParser/Project.py b/scripts/parser/ProjectParser/Project.py deleted file mode 100644 index 32556b4..0000000 --- a/scripts/parser/ProjectParser/Project.py +++ /dev/null @@ -1,7 +0,0 @@ -class Project: - def __init__(self, projectName): - self.projectName = projectName - self.settings = {} - - def __str__(self): - return 'app Name: {0} settings: {1}'.format(self.projectName, self.settings) \ No newline at end of file diff --git a/scripts/parser/ProjectParser/ProjectSetting/AttribureSetting.py b/scripts/parser/ProjectParser/ProjectSetting/AttribureSetting.py deleted file mode 100644 index 199dba5..0000000 --- a/scripts/parser/ProjectParser/ProjectSetting/AttribureSetting.py +++ /dev/null @@ -1,15 +0,0 @@ -from parser.ProjectParser.ProjectSetting.CsprojSettingBase import CsprojSettingBase - - -class AttributeSetting(CsprojSettingBase): - def __init__(self, name, value): - self._notNoneOrEmpty(name) - self._notNoneOrEmpty(value) - - self.attribute_name = name - self.attribute_value = value - - def apply(self, csproj): - assert csproj is not None - - setattr(csproj, self.attribute_name, self.attribute_value) diff --git a/scripts/parser/ProjectParser/ProjectSetting/CsprojSettingBase.py b/scripts/parser/ProjectParser/ProjectSetting/CsprojSettingBase.py deleted file mode 100644 index 748d833..0000000 --- a/scripts/parser/ProjectParser/ProjectSetting/CsprojSettingBase.py +++ /dev/null @@ -1,10 +0,0 @@ -class CsprojSettingBase: - def __init__(self, appName=None): - self.appName = appName - pass - - def apply(self, csproj): - pass - - def _notNoneOrEmpty(self, string_statement): - assert string_statement is not None and len(string_statement) > 0 diff --git a/scripts/parser/ProjectParser/ProjectSetting/KeyValueSetting.py b/scripts/parser/ProjectParser/ProjectSetting/KeyValueSetting.py deleted file mode 100644 index d480daa..0000000 --- a/scripts/parser/ProjectParser/ProjectSetting/KeyValueSetting.py +++ /dev/null @@ -1,15 +0,0 @@ -from parser.ProjectParser.ProjectSetting.CsprojSettingBase import CsprojSettingBase - - -class KeyValueSetting(CsprojSettingBase): - def __init__(self, key, value): - self._notNoneOrEmpty(key) - self._notNoneOrEmpty(value) - - self.key = key - self.value = value - - def apply(self, csproj): - assert csproj is not None - - csproj.settings[self.key] = self.value diff --git a/scripts/parser/ProjectParser/ProjectSetting/__init__.py b/scripts/parser/ProjectParser/ProjectSetting/__init__.py deleted file mode 100644 index cc31abc..0000000 --- a/scripts/parser/ProjectParser/ProjectSetting/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'rzaitov'