переместил файлы

This commit is contained in:
rzaitov 2013-11-01 18:24:12 +04:00
parent e18bebeae5
commit 131c8abe7b
57 changed files with 27 additions and 81 deletions

View File

@ -1,5 +1,5 @@
from CommandBuilders.CopyCommandBuilder import CopyCommandBuilder
from ManualTests.path_provider import PathProvider
from Tests.ManualTests.path_provider import PathProvider
line1 = "copy 'BuildSample/BuildSample.sln' to 'BuildSample/BuildSample.txt'"
line2 = "copy 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision' to '~/Library/MobileDevice/Provisioning Profiles/BuildScript.mobileprovision'"

View File

@ -1,5 +1,5 @@
from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder
from ManualTests.path_provider import PathProvider
from Tests.ManualTests.path_provider import PathProvider
line = "create backup for 'BuildSample'"

View File

@ -1,5 +1,5 @@
from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder
from ManualTests.path_provider import PathProvider
from Tests.ManualTests.path_provider import PathProvider
from commands.ValueProvider import ValueProvider
config = {'sln_config' : 'Release|iPhone'}

View File

@ -1,5 +1,5 @@
from CommandBuilders.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
from ManualTests.path_provider import PathProvider
from Tests.ManualTests.path_provider import PathProvider
line = "delete backup"

View File

@ -1,5 +1,5 @@
from CommandBuilders.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
from ManualTests.path_provider import PathProvider
from Tests.ManualTests.path_provider import PathProvider
line = "restore from backup"

View File

@ -1,5 +1,6 @@
import unittest
from utils.configs.BuildConfigProvider import BuildConfigProvider
from utils import BuildConfigProvider
from utils.BuildConfigProvider import BuildConfigProvider
class TestBuildConfigProvider(unittest.TestCase):

View File

@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
import unittest
from UnitTests.ProjectParser.ValueProvider import ValueProvider
from commands.ValueProvider import ValueProvider
from parser.InsideParser.InsideSetParser import InsideSetParser
class TestCsprojParser(unittest.TestCase):
def setUp(self):
value_provider = ValueProvider()
value_provider = ValueProvider({})
self.parser = InsideSetParser(value_provider, 'csproj')

View File

@ -0,0 +1,5 @@
Запуск всех тестов
python -m unittest discover -s Tests/UnitTests/
Запуск части тестов
python -m unittest discover -s Tests/UnitTests/CopyParser/

View File

@ -1,13 +0,0 @@
import unittest
from parser.BackupParser.CreateBackupParser import CreateBackupParser
class TestCreateBackupParser(unittest.TestCase):
def setUp(self):
self.__parser = CreateBackupParser()
def test_validInput(self):
line = "create backup for 'SomeFolder'"
createBackupArgs = self.__parser.parseLine(line)
self.assertEqual('SomeFolder', createBackupArgs.folderName)

View File

@ -1,23 +0,0 @@
import unittest
from parser.BackupParser.DeleteBackupParser import DeleteBackupParser
class TestDeleteBackupParser(unittest.TestCase):
def setUp(self):
self.__parser = DeleteBackupParser()
def test_isValid(self):
line = 'delete backup'
isValid = self.__parser.isValidLine(line)
self.assertEqual(True, isValid)
def test_isNotValid(self):
line = 'bla backup'
isValid = self.__parser.isValidLine(line)
self.assertEqual(False, isValid)
def test_validInput(self):
line = 'delete backup'
self.__parser.parseLine(line)

View File

@ -1,11 +0,0 @@
import unittest
from parser.BackupParser.RestoreBackupParser import RestoreBackupParser
class TestRestoreBackupParser(unittest.TestCase):
def setUp(self):
self.__parser = RestoreBackupParser()
def test_ValidInput(self):
line = 'restore from backup'
self.__parser.parseLine(line)

View File

@ -1,3 +0,0 @@
class ValueProvider:
def getValueFor(self, link):
return link

View File

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

View File

@ -1,5 +0,0 @@
Запуск всех тестов
python -m unittest discover -s UnitTests/
Запуск части тестов
python -m unittest discover -s UnitTests/CopyParser/

View File

@ -1,4 +1,4 @@
import utils.csproj.Patcher as csproj
import utils.CsprojPatcher as csproj
class PatchCsprojCommand():
def __init__(self, csprojAbsPath, key, value, slnConfig):
@ -13,7 +13,7 @@ class PatchCsprojCommand():
self.__slnConfig = slnConfig
def execute(self):
patcher = csproj.Patcher(self.__csprojAbsPath)
patcher = csproj.CsprojPatcher(self.__csprojAbsPath)
dictionary = { self.__key : self.__value }
patcher.AddOrReplace(dictionary, self.__slnConfig)

View File

@ -1,4 +1,4 @@
from utils.infoplist.Patcher import Patcher
from utils import InfoPlistPatcher
class PatchInfoPlistCommand():
@ -12,7 +12,7 @@ class PatchInfoPlistCommand():
self.__value = value
def execute(self):
patcher = Patcher(self.__pathToPlist)
patcher = InfoPlistPatcher(self.__pathToPlist)
dictionary = { self.__key : self.__value }
patcher.AddOrReplace(dictionary)

View File

@ -1,4 +1,4 @@
from utils.sln.Patcher import Patcher
from utils import SlnPatcher
class RemoveProjectCommand:
@ -10,5 +10,5 @@ class RemoveProjectCommand:
self.__projectName = projectName
def execute(self):
patcher = Patcher(self.__slnPath)
patcher = SlnPatcher(self.__slnPath)
patcher.removeProjects([self.__projectName])

View File

@ -1,4 +1,4 @@
from utils.testflight.TestflightPublisher import TestFlightPublisher
from utils.TestflightPublisher import TestFlightPublisher
class PublishToTestFlightCommand:

View File

@ -1,4 +1,6 @@
import os
from utils import BuildConfigProvider, FromFileSettingsProvider
scriptFilePath = os.path.abspath(__file__)
scriptDir = os.path.dirname(scriptFilePath)
@ -6,9 +8,8 @@ baseDir = os.path.join(scriptDir, os.pardir)
os.chdir(baseDir)
from SettingsProvider.FromFileSettingsProvider import FromFileSettingsProvider
from StepRunner.StepsRunner import StepsRunner
from utils.configs.BuildConfigProvider import BuildConfigProvider
class TaskRunner:
def run(self):

View File

@ -1,7 +1,7 @@
import xml.etree.ElementTree as eT
eT.register_namespace('', "http://schemas.microsoft.com/developer/msbuild/2003")
class Patcher:
class CsprojPatcher:
def __init__(self, csproj_abs_path):
self._csproj_abs_path = csproj_abs_path
self._tree = None

View File

@ -1,7 +1,7 @@
import xml.etree.ElementTree as eT
class Patcher():
class InfoPlistPatcher():
def __init__(self, infoPlistPath):
self.__infoPlistPath = infoPlistPath

View File

@ -1,7 +1,7 @@
import re
class Patcher:
class SlnPatcher:
def __init__(self, pathToSlnFile):
self._sln_path = pathToSlnFile
self._sln_file = None

View File

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

View File

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

View File

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

View File

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

View File

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