Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jul 19, 2016
1 parent 79a7085 commit 097e5bb
Show file tree
Hide file tree
Showing 12 changed files with 445 additions and 0 deletions.
28 changes: 28 additions & 0 deletions WrapperExample.sln
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
14 changes: 14 additions & 0 deletions WrapperExample.v2.ncrunchsolution
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>
46 changes: 46 additions & 0 deletions WrapperExample/Processor.cs
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);
}
}
}
36 changes: 36 additions & 0 deletions WrapperExample/Properties/AssemblyInfo.cs
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")]
27 changes: 27 additions & 0 deletions WrapperExample/Reference.cs
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
{

}
}
55 changes: 55 additions & 0 deletions WrapperExample/WrapperExample.csproj
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>
29 changes: 29 additions & 0 deletions WrapperExample/WrapperExample.v2.ncrunchproject
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>
48 changes: 48 additions & 0 deletions WrapperExampleTests/ProcessorTests.cs
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;
}
}
}
36 changes: 36 additions & 0 deletions WrapperExampleTests/Properties/AssemblyInfo.cs
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")]
Loading

0 comments on commit 097e5bb

Please sign in to comment.