избавился от ненужных файлов

This commit is contained in:
rzaitov 2013-10-30 19:34:27 +04:00
parent 51e3081151
commit 33c9f97e1e
8 changed files with 0 additions and 83 deletions

View File

@ -1 +0,0 @@
__author__ = 'rzaitov'

View File

@ -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)

View File

@ -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})

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
__author__ = 'rzaitov'