-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from dbones/master
Continued dev on 0.3.x
- Loading branch information
Showing
73 changed files
with
11,299 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.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>{356B6CFA-EFEA-43DA-83DD-C2093F3818DD}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Boxes.Integration.Test</RootNamespace> | ||
<AssemblyName>Boxes.Integration.Test</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Boxes.Core"> | ||
<HintPath>..\..\lib\Boxes.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Boxes.Test.Core"> | ||
<HintPath>..\..\lib\Boxes.Test.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="nunit.framework"> | ||
<HintPath>..\packages\NUnit.2.6.0.12054\lib\nunit.framework.dll</HintPath> | ||
</Reference> | ||
<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> | ||
<ItemGroup> | ||
<Compile Include="ContainerSetupBaseTests.cs" /> | ||
<Compile Include="TopologicalProcessOrderTests.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Boxes.Integration\Boxes.Integration.csproj"> | ||
<Project>{4d3cc463-a3c6-4569-bc00-a5c5d5a2ddd2}</Project> | ||
<Name>Boxes.Integration</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- 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> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2012 - 2013 dbones.co.uk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
namespace Boxes.Integration.Test | ||
{ | ||
using System; | ||
using System.Data; | ||
using System.Linq; | ||
using Boxes.Test; | ||
using Boxes.Test.Infrastructure; | ||
using Setup; | ||
using NUnit.Framework; | ||
using Setup.Registrations; | ||
|
||
public interface ILifeStyle {} | ||
|
||
public class Singleton : ILifeStyle {} | ||
|
||
public class Configure {} | ||
|
||
public class Register : RegisterBase<Type, Configure> | ||
{ | ||
} | ||
|
||
public class RegisterBaseTests : TestBase<IRegister<Type, Configure>> | ||
{ | ||
[Test] | ||
public void Simple_setup() | ||
{ | ||
Action(() => | ||
{ | ||
var reg = new Register() | ||
.LifeStyle(typeof(Singleton)) | ||
.Where(x => typeof(IDbCommand).IsAssignableFrom(x)) | ||
.AssociateWith(Contracts.SelfOnly); | ||
|
||
return new Context<IRegister<Type, Configure>>(reg); | ||
}); | ||
|
||
|
||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2012 - 2013 dbones.co.uk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Boxes.Integration.Test")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Microsoft")] | ||
[assembly: AssemblyProduct("Boxes.Integration.Test")] | ||
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("9eff756e-0d54-4911-873a-124c5faf4581")] | ||
|
||
// 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("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
61 changes: 61 additions & 0 deletions
61
src/Boxes.Integration.Test/TopologicalProcessOrderTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2012 - 2013 dbones.co.uk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
namespace Boxes.Integration.Test | ||
{ | ||
using Boxes.Test; | ||
using Boxes.Test.Infrastructure; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Process; | ||
using NUnit.Framework; | ||
|
||
public class TopologicalProcessOrderTests : TestBase<TopologicalProcessOrder> | ||
{ | ||
[Test] | ||
public void Order_dependencies() | ||
{ | ||
Arrange(() => | ||
{ | ||
Func<IEnumerable<string>, IEnumerable<Module>> createModules = | ||
titles => titles.Select(title => new Module(title, new Version(1, 0))); | ||
|
||
Func<string, IEnumerable<string>, IEnumerable<string>, Package> createPackage = | ||
(title, exports, imports) => | ||
{ | ||
var manifest = new Manifest(title, new Version(1, 0), "title", createModules(exports), | ||
createModules(imports)); | ||
var package = new Package(manifest, title); | ||
return package; | ||
}; | ||
|
||
dynamic ctx = new Context<TopologicalProcessOrder>(new TopologicalProcessOrder()); | ||
ctx.PackagesToSort = new List<Package>() | ||
{ | ||
createPackage("package1", new[] {"a1"}, new string[] {}), | ||
createPackage("package3", new[] {"a3"}, new[] {"a1", "a2"}), | ||
createPackage("package2", new[] {"a2"}, new[] {"a1"}), | ||
createPackage("package4", new[] {"a4"}, new[] {"a3"}), | ||
}; | ||
return ctx; | ||
}); | ||
Action(ctx => ((dynamic) ctx).Result = ctx.Sut.Arrange(((dynamic) ctx).PackagesToSort)); | ||
Assert(ctx => ((dynamic) ctx).Result[0].Name == "package1"); | ||
Assert(ctx => ((dynamic) ctx).Result[1].Name == "package2"); | ||
Assert(ctx => ((dynamic) ctx).Result[2].Name == "package3"); | ||
Assert(ctx => ((dynamic) ctx).Result[3].Name == "package4"); | ||
Execute(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit" version="2.6.0.12054" targetFramework="net40" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Boxes.Integration/Exceptions/ServiceTypeDoesNotMatchInstanceException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.