/UnitTests/GitCommandsTests/Patches/testdata/big.patch
Patch | 440 lines | 423 code | 17 blank | 0 comment | 0 complexity | f773a97e79c7d9f8155751c0161038f9 MD5 | raw file
Possible License(s): GPL-3.0
- From 95db80d3941b930282b8ae2ae4ffe4765b580af1 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Janusz=20Bia=C5=82obrzewski?= <jbialobr@o2.pl>
- Date: Mon, 8 Apr 2013 20:11:52 +0200
- Subject: [PATCH] GitCommandsTest renamed to GitExtensionsTest. TranslationTest
- restored.
- ---
- GitCommands/CommitInformationTest.cs | 2 +-
- GitCommands/Config/ConfigFileTest.cs | 2 +-
- GitCommands/Git/EncodingHelperTest.cs | 2 +-
- GitCommands/Git/GitBlameHeaderTest.cs | 2 +-
- GitCommands/Git/GitBlameTest.cs | 2 +-
- GitCommands/Git/GitCheckoutBranchCmdTest.cs | 2 +-
- GitCommands/Git/GitCommandCacheTest.cs | 2 +-
- GitCommands/Git/GitCommandHelpersTest.cs | 2 +-
- GitCommands/Helpers/FileInfoExtensions.cs | 2 +-
- GitCommands/Helpers/FileInfoExtensionsTest.cs | 2 +-
- GitCommands/Patch/PatchManagerTest.cs | 2 +-
- GitCommands/Patch/PatchTest.cs | 2 +-
- GitCommands/TestResource.Designer.cs | 70 ----------------------
- ...CommandsTest.csproj => GitExtensionsTest.csproj | 54 ++++++++++-------
- .../Properties => Properties}/AssemblyInfo.cs | 0
- Translation/TranslationTest.cs | 54 +++++++++++++++++
- GitCommands/packages.config => packages.config | 0
- 17 files changed, 98 insertions(+), 104 deletions(-)
- delete mode 100644 GitCommands/TestResource.Designer.cs
- rename GitCommands/GitCommandsTest.csproj => GitExtensionsTest.csproj (60%)
- rename {GitCommands/Properties => Properties}/AssemblyInfo.cs (100%)
- create mode 100644 Translation/TranslationTest.cs
- rename GitCommands/packages.config => packages.config (100%)
- diff --git a/GitCommands/CommitInformationTest.cs b/GitCommands/CommitInformationTest.cs
- index 7b6bec8..6e3ba67 100644
- --- a/GitCommands/CommitInformationTest.cs
- +++ b/GitCommands/CommitInformationTest.cs
- @@ -10,7 +10,7 @@ using System;
- using System.Linq;
- using GitCommands;
-
- -namespace GitCommandsTest
- +namespace GitExtensionsTest
- {
- [TestClass]
- public class CommitInformationTest
- diff --git a/GitCommands/Config/ConfigFileTest.cs b/GitCommands/Config/ConfigFileTest.cs
- index db87390..62281a9 100644
- --- a/GitCommands/Config/ConfigFileTest.cs
- +++ b/GitCommands/Config/ConfigFileTest.cs
- @@ -14,7 +14,7 @@ using System.IO;
- using GitCommands;
- using GitCommands.Config;
-
- -namespace GitCommandsTest.Config
- +namespace GitExtensionsTest.Config
- {
- /// <summary>
- /// Tests for configfile class.
- diff --git a/GitCommands/Git/EncodingHelperTest.cs b/GitCommands/Git/EncodingHelperTest.cs
- index de136d1..72fc48e 100644
- --- a/GitCommands/Git/EncodingHelperTest.cs
- +++ b/GitCommands/Git/EncodingHelperTest.cs
- @@ -11,7 +11,7 @@ using System.Text;
- using GitCommands;
- using System.Collections.Generic;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
- [TestClass]
- public class EncodingHelperTest
- diff --git a/GitCommands/Git/GitBlameHeaderTest.cs b/GitCommands/Git/GitBlameHeaderTest.cs
- index 116d892..26c5f08 100644
- --- a/GitCommands/Git/GitBlameHeaderTest.cs
- +++ b/GitCommands/Git/GitBlameHeaderTest.cs
- @@ -12,7 +12,7 @@ using GitCommands;
- using System.Collections.Generic;
- using System.Drawing;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
-
- [TestClass]
- diff --git a/GitCommands/Git/GitBlameTest.cs b/GitCommands/Git/GitBlameTest.cs
- index 2537711..b2d582c 100644
- --- a/GitCommands/Git/GitBlameTest.cs
- +++ b/GitCommands/Git/GitBlameTest.cs
- @@ -11,7 +11,7 @@ using System.Text;
- using GitCommands;
- using System.Collections.Generic;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
- [TestClass]
- public class GitBlameTest
- diff --git a/GitCommands/Git/GitCheckoutBranchCmdTest.cs b/GitCommands/Git/GitCheckoutBranchCmdTest.cs
- index 8ac8a96..8d8fee3 100644
- --- a/GitCommands/Git/GitCheckoutBranchCmdTest.cs
- +++ b/GitCommands/Git/GitCheckoutBranchCmdTest.cs
- @@ -11,7 +11,7 @@ using System.Collections.Generic;
- using System.Linq;
- using GitCommands.Git;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
- [TestClass]
- public class GitCheckoutBranchCmdTest
- diff --git a/GitCommands/Git/GitCommandCacheTest.cs b/GitCommands/Git/GitCommandCacheTest.cs
- index a513c57..b8192fb 100644
- --- a/GitCommands/Git/GitCommandCacheTest.cs
- +++ b/GitCommands/Git/GitCommandCacheTest.cs
- @@ -11,7 +11,7 @@ using System.Linq;
- using GitCommands;
- using System.Collections.Generic;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
-
- [TestClass]
- diff --git a/GitCommands/Git/GitCommandHelpersTest.cs b/GitCommands/Git/GitCommandHelpersTest.cs
- index 387c472..7ba7895 100644
- --- a/GitCommands/Git/GitCommandHelpersTest.cs
- +++ b/GitCommands/Git/GitCommandHelpersTest.cs
- @@ -10,7 +10,7 @@ using System;
- using GitCommands;
- using System.Collections.Generic;
-
- -namespace GitCommandsTest.Git
- +namespace GitExtensionsTest.Git
- {
- [TestClass]
- public class GitCommandsHelperTest
- diff --git a/GitCommands/Helpers/FileInfoExtensions.cs b/GitCommands/Helpers/FileInfoExtensions.cs
- index fd69608..418978d 100644
- --- a/GitCommands/Helpers/FileInfoExtensions.cs
- +++ b/GitCommands/Helpers/FileInfoExtensions.cs
- @@ -7,7 +7,7 @@ using System.Text;
- using System.Security.Cryptography;
- using System.Threading.Tasks;
-
- -namespace GitCommandsTest.Helpers
- +namespace GitExtensionsTest.Helpers
- {
- public static class FileInfoExtensions
- {
- diff --git a/GitCommands/Helpers/FileInfoExtensionsTest.cs b/GitCommands/Helpers/FileInfoExtensionsTest.cs
- index c6017c8..ab44f62 100644
- --- a/GitCommands/Helpers/FileInfoExtensionsTest.cs
- +++ b/GitCommands/Helpers/FileInfoExtensionsTest.cs
- @@ -14,7 +14,7 @@ using System.Collections.Generic;
- using System.Linq;
- using System.Text;
-
- -namespace GitCommandsTest.Helpers
- +namespace GitExtensionsTest.Helpers
- {
- [TestClass]
- public class FileInfoExtensionsTest
- diff --git a/GitCommands/Patch/PatchManagerTest.cs b/GitCommands/Patch/PatchManagerTest.cs
- index ad6627f..f4745b8 100644
- --- a/GitCommands/Patch/PatchManagerTest.cs
- +++ b/GitCommands/Patch/PatchManagerTest.cs
- @@ -12,7 +12,7 @@ using System.Collections.Generic;
- using System.Linq;
- using System.Text;
-
- -namespace GitCommandsTest.Patch
- +namespace GitExtensionsTest.Patch
- {
- [TestClass]
- class PatchManagerTest
- diff --git a/GitCommands/Patch/PatchTest.cs b/GitCommands/Patch/PatchTest.cs
- index e7ddd17..5fdad9a 100644
- --- a/GitCommands/Patch/PatchTest.cs
- +++ b/GitCommands/Patch/PatchTest.cs
- @@ -11,7 +11,7 @@ using System.Collections.Generic;
- using System.Linq;
- using System.Text;
-
- -namespace GitCommandsTest.Patch
- +namespace GitExtensionsTest.Patch
- {
- [TestClass]
- class PatchTest
- diff --git a/GitCommands/TestResource.Designer.cs b/GitCommands/TestResource.Designer.cs
- deleted file mode 100644
- index 586c3fd..0000000
- --- a/GitCommands/TestResource.Designer.cs
- +++ /dev/null
- @@ -1,70 +0,0 @@
- -//------------------------------------------------------------------------------
- -// <auto-generated>
- -// This code was generated by a tool.
- -// Runtime Version:4.0.30319.1
- -//
- -// Changes to this file may cause incorrect behavior and will be lost if
- -// the code is regenerated.
- -// </auto-generated>
- -//------------------------------------------------------------------------------
- -
- -namespace GitCommandsTests
- -{
- -
- -
- - /// <summary>
- - /// A strongly-typed resource class, for looking up localized strings, etc.
- - /// </summary>
- - // This class was auto-generated by the StronglyTypedResourceBuilder
- - // class via a tool like ResGen or Visual Studio.
- - // To add or remove a member, edit your .ResX file then rerun ResGen
- - // with the /str option, or rebuild your VS project.
- - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- - internal class TestResource {
- -
- - private static global::System.Resources.ResourceManager resourceMan;
- -
- - private static global::System.Globalization.CultureInfo resourceCulture;
- -
- - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- - internal TestResource() {
- - }
- -
- - /// <summary>
- - /// Returns the cached ResourceManager instance used by this class.
- - /// </summary>
- - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- - internal static global::System.Resources.ResourceManager ResourceManager {
- - get {
- - if (object.ReferenceEquals(resourceMan, null)) {
- - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GitCommandsTests.TestResource", typeof(TestResource).Assembly);
- - resourceMan = temp;
- - }
- - return resourceMan;
- - }
- - }
- -
- - /// <summary>
- - /// Overrides the current thread's CurrentUICulture property for all
- - /// resource lookups using this strongly typed resource class.
- - /// </summary>
- - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- - internal static global::System.Globalization.CultureInfo Culture {
- - get {
- - return resourceCulture;
- - }
- - set {
- - resourceCulture = value;
- - }
- - }
- -
- - internal static byte[] TestPatch {
- - get {
- - object obj = ResourceManager.GetObject("TestPatch", resourceCulture);
- - return ((byte[])(obj));
- - }
- - }
- - }
- -}
- diff --git a/GitCommands/GitCommandsTest.csproj b/GitExtensionsTest.csproj
- similarity index 60%
- rename from GitCommands/GitCommandsTest.csproj
- rename to GitExtensionsTest.csproj
- index 1a1b284..2c8496d 100644
- --- a/GitCommands/GitCommandsTest.csproj
- +++ b/GitExtensionsTest.csproj
- @@ -7,9 +7,9 @@
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{AC8FDEDF-6390-4F87-BBC3-1A974810B589}</ProjectGuid>
- <OutputType>Library</OutputType>
- - <RootNamespace>GitCommandsTest</RootNamespace>
- - <AssemblyName>GitCommandsTests</AssemblyName>
- - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- + <RootNamespace>GitExtensionsTest</RootNamespace>
- + <AssemblyName>GitExtensionsTest</AssemblyName>
- + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- @@ -21,7 +21,7 @@
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- - <CodeAnalysisRuleSet>..\..\FxCopRules.ruleset</CodeAnalysisRuleSet>
- + <CodeAnalysisRuleSet>..\FxCopRules.ruleset</CodeAnalysisRuleSet>
- <RunCodeAnalysis>true</RunCodeAnalysis>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- @@ -33,48 +33,58 @@
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- <RunCodeAnalysis>true</RunCodeAnalysis>
- - <CodeAnalysisRuleSet>..\..\FxCopRules.ruleset</CodeAnalysisRuleSet>
- + <CodeAnalysisRuleSet>..\FxCopRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- - <HintPath>..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
- + <HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="nunit.mocks, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- - <HintPath>..\..\packages\NUnit.Mocks.2.6.2\lib\nunit.mocks.dll</HintPath>
- + <HintPath>..\packages\NUnit.Mocks.2.6.2\lib\nunit.mocks.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Core" />
- + <Reference Include="System.Windows.Forms" />
- </ItemGroup>
- <ItemGroup>
- - <Compile Include="CommitInformationTest.cs" />
- - <Compile Include="Config\ConfigFileTest.cs" />
- - <Compile Include="Git\GitCommandHelpersTest.cs" />
- - <Compile Include="Git\EncodingHelperTest.cs" />
- - <Compile Include="Helpers\FileInfoExtensions.cs" />
- - <Compile Include="Helpers\FileInfoExtensionsTest.cs" />
- - <Compile Include="Patch\PatchManagerTest.cs" />
- - <Compile Include="Patch\PatchTest.cs" />
- + <Compile Include="GitCommands\CommitInformationTest.cs" />
- + <Compile Include="GitCommands\Config\ConfigFileTest.cs" />
- + <Compile Include="GitCommands\Git\GitCommandHelpersTest.cs" />
- + <Compile Include="GitCommands\Git\EncodingHelperTest.cs" />
- + <Compile Include="GitCommands\Helpers\FileInfoExtensions.cs" />
- + <Compile Include="GitCommands\Helpers\FileInfoExtensionsTest.cs" />
- + <Compile Include="GitCommands\Patch\PatchManagerTest.cs" />
- + <Compile Include="GitCommands\Patch\PatchTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- - <Compile Include="Git\GitBlameTest.cs" />
- - <Compile Include="Git\GitBlameHeaderTest.cs" />
- - <Compile Include="Git\GitCheckoutBranchCmdTest.cs" />
- - <Compile Include="Git\GitCommandCacheTest.cs" />
- + <Compile Include="GitCommands\Git\GitBlameTest.cs" />
- + <Compile Include="GitCommands\Git\GitBlameHeaderTest.cs" />
- + <Compile Include="GitCommands\Git\GitCheckoutBranchCmdTest.cs" />
- + <Compile Include="GitCommands\Git\GitCommandCacheTest.cs" />
- + <Compile Include="Translation\TranslationTest.cs" />
- </ItemGroup>
- <ItemGroup>
- - <ProjectReference Include="..\..\GitCommands\GitCommands.csproj">
- + <ProjectReference Include="..\GitCommands\GitCommands.csproj">
- <Project>{BD6AA2A2-997D-4AFF-ACC7-B64F6E51D181}</Project>
- <Name>GitCommands</Name>
- </ProjectReference>
- - <ProjectReference Include="..\..\Plugins\GitUIPluginInterfaces\GitUIPluginInterfaces.csproj">
- + <ProjectReference Include="..\GitUI\GitUI.csproj">
- + <Project>{CF5B22E7-230F-4E50-BE88-C4F7023CED2C}</Project>
- + <Name>GitUI</Name>
- + </ProjectReference>
- + <ProjectReference Include="..\Plugins\GitUIPluginInterfaces\GitUIPluginInterfaces.csproj">
- <Project>{27559302-F35E-4B62-A6EC-11FF21A5FA6F}</Project>
- <Name>GitUIPluginInterfaces</Name>
- </ProjectReference>
- + <ProjectReference Include="..\ResourceManager\ResourceManager.csproj">
- + <Project>{D3440FD7-AFC5-4351-8741-6CDBF15CE944}</Project>
- + <Name>ResourceManager</Name>
- + </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- - <Folder Include="Patch\testdata\" />
- + <Folder Include="GitCommands\Patch\testdata\" />
- </ItemGroup>
- <ItemGroup>
- <None Include="packages.config" />
- diff --git a/GitCommands/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
- similarity index 100%
- rename from GitCommands/Properties/AssemblyInfo.cs
- rename to Properties/AssemblyInfo.cs
- diff --git a/Translation/TranslationTest.cs b/Translation/TranslationTest.cs
- new file mode 100644
- index 0000000..19a57aa
- --- /dev/null
- +++ b/Translation/TranslationTest.cs
- @@ -0,0 +1,54 @@
- +#if !NUNIT
- +using Microsoft.VisualStudio.TestTools.UnitTesting;
- +using Category = Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute;
- +#else
- +using NUnit.Framework;
- +using TestInitialize = NUnit.Framework.SetUpAttribute;
- +using TestContext = System.Object;
- +using TestProperty = NUnit.Framework.PropertyAttribute;
- +using TestClass = NUnit.Framework.TestFixtureAttribute;
- +using TestMethod = NUnit.Framework.TestAttribute;
- +using TestCleanup = NUnit.Framework.TearDownAttribute;
- +#endif
- +using GitUI;
- +using System;
- +using System.Collections.Generic;
- +using System.Diagnostics;
- +using System.Reflection;
- +using ResourceManager.Translation;
- +
- +
- +namespace GitExtensionsTest.Translation
- +{
- + [TestClass]
- + public class TranslationTest
- + {
- +
- + [TestMethod]
- + [STAThread]
- + public void CreateInstanceOfClass()
- + {
- + // just reference to GitUI
- + MouseWheelRedirector.Active = true;
- +
- + List<Type> translatableTypes = TranslationUtl.GetTranslatableTypes();
- +
- + ResourceManager.Translation.Translation testTranslation = new ResourceManager.Translation.Translation();
- +
- + foreach (Type type in translatableTypes)
- + {
- + try
- + {
- + ITranslate obj = TranslationUtl.CreateInstanceOfClass(type) as ITranslate;
- + obj.AddTranslationItems(testTranslation);
- + obj.TranslateItems(testTranslation);
- + }
- + catch (System.Exception)
- + {
- + Trace.WriteLine("Problem with class: " + type.FullName);
- + throw;
- + }
- + }
- + }
- + }
- +}
- diff --git a/GitCommands/packages.config b/packages.config
- similarity index 100%
- rename from GitCommands/packages.config
- rename to packages.config
- --
- 1.8.1.msysgit.1