-
Notifications
You must be signed in to change notification settings - Fork 70
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 #68 from andrewchaa/PublicContexts
Moving contexts to OpenRasta.Testing
- Loading branch information
Showing
39 changed files
with
11,092 additions
and
11,027 deletions.
There are no files selected for viewing
21,920 changes: 10,960 additions & 10,960 deletions
21,920
packages/NUnit.2.6.3/lib/nunit.framework.xml
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...nRasta.Tests.Unit/Codecs/codec_context.cs → ...enRasta.Testing/Contexts/codec_context.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using OpenRasta.Pipeline; | ||
|
||
namespace OpenRasta.Testing.Contexts | ||
{ | ||
public abstract class contributor_context<T> : openrasta_context | ||
where T : class, IPipelineContributor | ||
{ | ||
public void given_contributor() | ||
{ | ||
given_pipeline_contributor<T>(); | ||
} | ||
|
||
protected void then_contributor_returns(PipelineContinuation continuation) | ||
{ | ||
Result.ShouldBe(continuation); | ||
} | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
....Unit/Codecs/media_type_writer_context.cs → ...ing/Contexts/media_type_writer_context.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
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,38 @@ | ||
using System; | ||
using System.Linq; | ||
using OpenRasta.Binding; | ||
using OpenRasta.OperationModel; | ||
using OpenRasta.OperationModel.MethodBased; | ||
using OpenRasta.TypeSystem; | ||
|
||
namespace OpenRasta.Testing.Contexts | ||
{ | ||
public abstract class operation_context<THandler> : openrasta_context | ||
{ | ||
protected operation_context() | ||
{ | ||
Handler = TypeSystem.FromClr<THandler>(); | ||
} | ||
|
||
protected IType Handler { get; set; } | ||
protected IOperation Operation { get; set; } | ||
|
||
protected void given_operation(string name, params Type[] parameters) | ||
{ | ||
IMethod method = (from m in Handler.GetMethods() | ||
where m.InputMembers.Count() == parameters.Length && m.Name.EqualsOrdinalIgnoreCase(name) | ||
let matchingParams = | ||
(from parameter in m.InputMembers | ||
from typeParameter in parameters | ||
where parameter.Type.CompareTo(parameter.TypeSystem.FromClr(typeParameter)) == 0 | ||
select parameter).Count() | ||
where parameters.Length == 0 || matchingParams == parameters.Length | ||
select m).First(); | ||
Operation = new MethodBasedOperation(new DefaultObjectBinderLocator(), Handler, method) | ||
{ | ||
Resolver = Resolver | ||
}; | ||
} | ||
|
||
} | ||
} |
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,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"> | ||
<metadata> | ||
<id>openrasta-testing</id> | ||
<version>$version$</version> | ||
<title>OpenRasta.Testing</title> | ||
<authors>Sebastien Lambla</authors> | ||
<owners>Sebastien Lambla</owners> | ||
<licenseUrl>http://openrasta.org/</licenseUrl> | ||
<projectUrl>https://github.com/openrasta/openrasta-core</projectUrl> | ||
<iconUrl>http://openrasta.org/openRastaLogo-32x32.png</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>BDD-style contexts for developing OpenRasta extensions.</description> | ||
<releaseNotes /> | ||
<copyright>Copyright 2007</copyright> | ||
<tags>OpenRasta Testing Contexts</tags> | ||
<dependencies> | ||
<dependency id="openrasta-core" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="bin\release\OpenRasta.Testing.dll" target="lib\net40\OpenRasta.Testing.dll" /> | ||
</files> | ||
</package> |
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
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
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
3 changes: 2 additions & 1 deletion
3
src/OpenRasta.Tests.Unit/Pipeline/Contributors/AuthenticationChallenger_Specification.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
3 changes: 2 additions & 1 deletion
3
src/OpenRasta.Tests.Unit/Pipeline/Contributors/Authentication_Specification.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
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.