-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Jul 19, 2016
1 parent
79a7085
commit 097e5bb
Showing
12 changed files
with
445 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25123.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WrapperExample", "WrapperExample\WrapperExample.csproj", "{9DC79620-4A81-49B0-8641-DE75751F92AC}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WrapperExampleTests", "WrapperExampleTests\WrapperExampleTests.csproj", "{548B850C-F11D-469F-9BA9-3A710B5E1489}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9DC79620-4A81-49B0-8641-DE75751F92AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9DC79620-4A81-49B0-8641-DE75751F92AC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9DC79620-4A81-49B0-8641-DE75751F92AC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9DC79620-4A81-49B0-8641-DE75751F92AC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{548B850C-F11D-469F-9BA9-3A710B5E1489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{548B850C-F11D-469F-9BA9-3A710B5E1489}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{548B850C-F11D-469F-9BA9-3A710B5E1489}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{548B850C-F11D-469F-9BA9-3A710B5E1489}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
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,14 @@ | ||
<SolutionConfiguration> | ||
<FileVersion>1</FileVersion> | ||
<InferProjectReferencesUsingAssemblyNames>false</InferProjectReferencesUsingAssemblyNames> | ||
<AllowParallelTestExecution>true</AllowParallelTestExecution> | ||
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves> | ||
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit> | ||
<FrameworkUtilisationTypeForGallio>UseStaticAnalysis</FrameworkUtilisationTypeForGallio> | ||
<FrameworkUtilisationTypeForMSpec>UseStaticAnalysis</FrameworkUtilisationTypeForMSpec> | ||
<FrameworkUtilisationTypeForMSTest>UseStaticAnalysis</FrameworkUtilisationTypeForMSTest> | ||
<FrameworkUtilisationTypeForXUnit2>UseDynamicAnalysis</FrameworkUtilisationTypeForXUnit2> | ||
<NCrunchCacheStoragePath /> | ||
<MetricsExclusionList> | ||
</MetricsExclusionList> | ||
</SolutionConfiguration> |
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,46 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WrapperExample | ||
{ | ||
public class Processor | ||
{ | ||
private readonly IEnhancedSeatMapClient clientWrapper; | ||
|
||
public Processor(IEnhancedSeatMapClient clientWrapper) | ||
{ | ||
this.clientWrapper = clientWrapper; | ||
} | ||
|
||
public virtual SeatMapResponse SeatMap(SeatMapRequest seatMapRequest) | ||
{ | ||
return new SeatMapResponse(); | ||
} | ||
} | ||
|
||
public class SeatMapRequest | ||
{ | ||
} | ||
|
||
public class SeatMapResponse | ||
{ | ||
} | ||
|
||
public interface IEnhancedSeatMapClient | ||
{ | ||
EnhancedSeatMapRS EnhancedSeatMap(EnhancedSeatMapRQ enhancedSeatMapRequest); | ||
} | ||
|
||
public class EnhancedSeatMapClientWrapper : IEnhancedSeatMapClient | ||
{ | ||
EnhancedSeatMapPortTypeClient client = new EnhancedSeatMapPortTypeClient(); | ||
|
||
public EnhancedSeatMapRS EnhancedSeatMap(EnhancedSeatMapRQ enhancedSeatMapRequest) | ||
{ | ||
return client.EnhancedSeatMap(enhancedSeatMapRequest); | ||
} | ||
} | ||
} |
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,36 @@ | ||
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("WrapperExample")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("WrapperExample")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[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("9dc79620-4a81-49b0-8641-de75751f92ac")] | ||
|
||
// 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")] |
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,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WrapperExample | ||
{ | ||
public partial class EnhancedSeatMapPortTypeClient | ||
{ | ||
// Don't want to have to mark this as "virtual" as this is generated code. | ||
public EnhancedSeatMapRS EnhancedSeatMap(EnhancedSeatMapRQ EnhancedSeatMapRQ) | ||
{ | ||
return new EnhancedSeatMapRS(); | ||
} | ||
} | ||
|
||
public class EnhancedSeatMapRS | ||
{ | ||
|
||
} | ||
|
||
public class EnhancedSeatMapRQ | ||
{ | ||
|
||
} | ||
} |
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,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.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>{9DC79620-4A81-49B0-8641-DE75751F92AC}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>WrapperExample</RootNamespace> | ||
<AssemblyName>WrapperExample</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</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> | ||
</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> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<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.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Processor.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Reference.cs" /> | ||
</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,29 @@ | ||
<ProjectConfiguration> | ||
<AutoDetectNugetBuildDependencies>true</AutoDetectNugetBuildDependencies> | ||
<BuildPriority>1000</BuildPriority> | ||
<CopyReferencedAssembliesToWorkspace>false</CopyReferencedAssembliesToWorkspace> | ||
<ConsiderInconclusiveTestsAsPassing>false</ConsiderInconclusiveTestsAsPassing> | ||
<PreloadReferencedAssemblies>false</PreloadReferencedAssemblies> | ||
<AllowDynamicCodeContractChecking>true</AllowDynamicCodeContractChecking> | ||
<AllowStaticCodeContractChecking>false</AllowStaticCodeContractChecking> | ||
<AllowCodeAnalysis>false</AllowCodeAnalysis> | ||
<IgnoreThisComponentCompletely>false</IgnoreThisComponentCompletely> | ||
<RunPreBuildEvents>false</RunPreBuildEvents> | ||
<RunPostBuildEvents>false</RunPostBuildEvents> | ||
<PreviouslyBuiltSuccessfully>true</PreviouslyBuiltSuccessfully> | ||
<InstrumentAssembly>true</InstrumentAssembly> | ||
<PreventSigningOfAssembly>false</PreventSigningOfAssembly> | ||
<AnalyseExecutionTimes>true</AnalyseExecutionTimes> | ||
<DetectStackOverflow>true</DetectStackOverflow> | ||
<IncludeStaticReferencesInWorkspace>true</IncludeStaticReferencesInWorkspace> | ||
<DefaultTestTimeout>60000</DefaultTestTimeout> | ||
<UseBuildConfiguration></UseBuildConfiguration> | ||
<UseBuildPlatform></UseBuildPlatform> | ||
<ProxyProcessPath></ProxyProcessPath> | ||
<UseCPUArchitecture>AutoDetect</UseCPUArchitecture> | ||
<MSTestThreadApartmentState>STA</MSTestThreadApartmentState> | ||
<BuildProcessArchitecture>x86</BuildProcessArchitecture> | ||
<IgnoredTests> | ||
<AllTestsSelector /> | ||
</IgnoredTests> | ||
</ProjectConfiguration> |
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,48 @@ | ||
using System; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using NUnit.Framework; | ||
using WrapperExample; | ||
using Assert = NUnit.Framework.Assert; | ||
|
||
namespace WrapperExampleTests | ||
{ | ||
[TestClass] | ||
public class ProcessorTests | ||
{ | ||
private VirtualEnhancedSeatMapClientWrapper clientWrapper; | ||
private Processor processor; | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
EnhancedSeatMapRS seatMapRs = new EnhancedSeatMapRS(); | ||
var clientWrapper = new VirtualEnhancedSeatMapClientWrapper(seatMapRs); | ||
processor = new Processor(clientWrapper); | ||
} | ||
|
||
[Test] | ||
public void SeatMap_ReturnsNonEmptySeatMapResponse() | ||
{ | ||
var seatMapRequest = new SeatMapRequest(); | ||
var seatMapResponse = processor.SeatMap(seatMapRequest); | ||
Assert.IsNotNull(seatMapResponse); | ||
} | ||
} | ||
|
||
public class VirtualEnhancedSeatMapClientWrapper : IEnhancedSeatMapClient | ||
{ | ||
private readonly EnhancedSeatMapRS response; | ||
public bool EnhancedSeatMapInvoked; | ||
|
||
public VirtualEnhancedSeatMapClientWrapper(EnhancedSeatMapRS response) | ||
{ | ||
this.response = response; | ||
} | ||
|
||
public EnhancedSeatMapRS EnhancedSeatMap(EnhancedSeatMapRQ enhancedSeatMapRequest) | ||
{ | ||
EnhancedSeatMapInvoked = true; | ||
return response; | ||
} | ||
} | ||
} |
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,36 @@ | ||
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("WrapperExampleTests")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("WrapperExampleTests")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[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("548b850c-f11d-469f-9ba9-3a710b5e1489")] | ||
|
||
// 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")] |
Oops, something went wrong.