Skip to content

Commit

Permalink
Merge branch 'refactor-split-test-project'
Browse files Browse the repository at this point in the history
  • Loading branch information
itajaja committed Oct 17, 2014
2 parents 782ca5a + 8d16aff commit 4281c23
Show file tree
Hide file tree
Showing 19 changed files with 303 additions and 665 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(grunt) {
projectName: 'h-dependency',

// These variables shouldn't be changed, but sometimes it might be necessary
srcPath: 'h-dependency/',
srcPath: './',
solutionName: '<%= projectName %>.sln',
dotNetVersion: '4.5.0',
platform: 'Any CPU',
Expand Down Expand Up @@ -45,8 +45,7 @@ module.exports = function(grunt) {
platform: '<%= platform %>',
targets: ['Clean', 'Rebuild'],
buildParameters: {
StyleCopEnabled: false,
nowarn: '1591'
StyleCopEnabled: false
}
}
},
Expand All @@ -62,8 +61,7 @@ module.exports = function(grunt) {
StyleCopOverrideSettingsFile: '../<%= styleCopRules %>',
RunCodeAnalysis: true,
CodeAnalysisRuleSet: '../<%= ruleSet %>',
TreatWarningsAsErrors: true,
nowarn: '1591'
TreatWarningsAsErrors: true
},
}
}
Expand Down
35 changes: 35 additions & 0 deletions h-dependency.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "h-dependency", "h-dependency\h-dependency.csproj", "{7B1A6611-65A4-4A85-8627-22075068A7E3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{88B04B22-56A9-4F17-BB43-15D6DFA47232}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{7FA75BE3-2BB0-4094-9200-97C436E3C576}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7B1A6611-65A4-4A85-8627-22075068A7E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B1A6611-65A4-4A85-8627-22075068A7E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B1A6611-65A4-4A85-8627-22075068A7E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B1A6611-65A4-4A85-8627-22075068A7E3}.Release|Any CPU.Build.0 = Release|Any CPU
{7FA75BE3-2BB0-4094-9200-97C436E3C576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FA75BE3-2BB0-4094-9200-97C436E3C576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FA75BE3-2BB0-4094-9200-97C436E3C576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FA75BE3-2BB0-4094-9200-97C436E3C576}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
8 changes: 7 additions & 1 deletion h-dependency/HDependency.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("h-dependency.test")]

namespace Hylasoft.Dependency
{
Expand Down Expand Up @@ -32,14 +35,17 @@ public static Hdependency Initialize(bool test = false)
return Provider;
}

/// <summary>
/// Gets the currently initialized provider. If the provider has not been initialized it returns null
/// </summary>
public static Hdependency Provider { get; private set; }

private static bool _canBeInitialized = true;

#endregion

/// <summary>
/// default constructor made private
/// default constructor made private to enforce singleton pattern
/// </summary>
internal Hdependency()
{
Expand Down
15 changes: 5 additions & 10 deletions h-dependency/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -8,9 +7,9 @@
[assembly: AssemblyTitle("h-dependency")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("hylasoft")]
[assembly: AssemblyCompany("HP")]
[assembly: AssemblyProduct("h-dependency")]
[assembly: AssemblyCopyright(" ")]
[assembly: AssemblyCopyright("Copyright © HP 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -20,17 +19,13 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("76751769-0ec7-4eb0-a508-162a956c58a5")]
[assembly: Guid("3f2f7385-3b9b-434f-9a54-6194b9ab7bce")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.1.0")]
[assembly: AssemblyVersion("0.1.0")]
[assembly: AssemblyFileVersion("0.1.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
6 changes: 6 additions & 0 deletions h-dependency/Settings.StyleCop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<StyleCopSettings Version="105">
<GlobalSettings>
<StringProperty Name="LinkedSettingsFile"></StringProperty>
<StringProperty Name="MergeSettingsFiles">Linked</StringProperty>
</GlobalSettings>
</StyleCopSettings>
74 changes: 47 additions & 27 deletions h-dependency/h-dependency.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3FB0D4C4-03AC-4670-918B-B60A14289079}</ProjectGuid>
<ProjectGuid>{7B1A6611-65A4-4A85-8627-22075068A7E3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Hylasoft.Dependency</RootNamespace>
<AssemblyName>h-dependency</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand All @@ -22,59 +28,73 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\h-dependency.xml</DocumentationFile>
<CodeAnalysisRuleSet>..\rules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\h-dependency.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;CODE_ANALYSIS</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\h-dependency.xml</DocumentationFile>
<DocumentationFile>bin\Release\h-dependency.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="h-behavior">
<HintPath>packages\Hylasoft.Behavior.0.1.3\lib\h-behavior.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise />
</Choose>
<ItemGroup>
<Compile Include="HDependency.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="tests\HDependency.Tests.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="Settings.StyleCop" />
</ItemGroup>
<ItemGroup Label="StyleCopAdditionalAddinPaths">
<StyleCopAdditionalAddinPaths Include="packages\BuildTools.StyleCopPlus.4.7.49.4\tools">
<StyleCopAdditionalAddinPaths Include="..\packages\BuildTools.StyleCopPlus.4.7.49.4\tools">
<Visible>false</Visible>
</StyleCopAdditionalAddinPaths>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\BuildTools.StyleCop.4.7.49.0\tools\StyleCop.targets" Condition="Exists('packages\BuildTools.StyleCop.4.7.49.0\tools\StyleCop.targets')" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<Import Project="..\packages\BuildTools.StyleCop.4.7.49.0\tools\StyleCop.targets" Condition="Exists('..\packages\BuildTools.StyleCop.4.7.49.0\tools\StyleCop.targets')" />
<Target Name="___packages_BuildTools_StyleCop_4_7_49_0_tools_StyleCop_targets" Condition="$(StyleCopOutputFile)==''" BeforeTargets="BeforeBuild">
<Error Text="BuildTools_StyleCop - the BuildTools_StyleCop package has not been restored.&#xD;&#xA;If you are running this from an IDE, make sure NuGet Package Restore has been enabled, then reload the solution and re-run the build.&#xD;&#xA;If you are running this from the command line, run the build again.&#xD;&#xA;If this is a CI server, you may want to make sure NuGet Package Restore runs before your build with:&#xD;&#xA; msbuild solution.sln /t:restorepackages" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
Expand Down
29 changes: 0 additions & 29 deletions h-dependency/h-dependency.sln

This file was deleted.

1 change: 0 additions & 1 deletion h-dependency/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
<packages>
<package id="BuildTools.StyleCop" version="4.7.49.0" targetFramework="net45" />
<package id="BuildTools.StyleCopPlus" version="4.7.49.4" targetFramework="net45" />
<package id="Hylasoft.Behavior" version="0.1.3" targetFramework="net45" />
</packages>
Loading

0 comments on commit 4281c23

Please sign in to comment.