Click here to Skip to main content
15,881,424 members
Articles / Web Development / ASP.NET

How to Mock a WCF Service

Rate me:
Please Sign up or sign in to vote.
4.64/5 (11 votes)
27 Jan 2012CPOL3 min read 92.9K   2K   25  
How to Mock a WCF Service while writing a unit test

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClient", "WCFClient\WCFClient\WCFClient.csproj", "{651FC8F5-9E74-45EA-B0C3-96498F989807}"
	ProjectSection(ProjectDependencies) = postProject
		{CC01B944-CD53-4B3A-9734-A2EFB977F337} = {CC01B944-CD53-4B3A-9734-A2EFB977F337}
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClientTest", "WCFClientTest\WCFClientTest.csproj", "{B41C3F48-055F-4F75-9573-2890FF27D75F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AD92A5AF-1602-40CF-A57B-9166A1A46970}"
	ProjectSection(SolutionItems) = preProject
		Local.testsettings = Local.testsettings
		TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
		WCFClient.vsmdi = WCFClient.vsmdi
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFService", "WCFService\WCFService.csproj", "{CC01B944-CD53-4B3A-9734-A2EFB977F337}"
EndProject
Global
	GlobalSection(TestCaseManagementSettings) = postSolution
		CategoryFile = WCFClient.vsmdi
	EndGlobalSection
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{651FC8F5-9E74-45EA-B0C3-96498F989807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{651FC8F5-9E74-45EA-B0C3-96498F989807}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{651FC8F5-9E74-45EA-B0C3-96498F989807}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{651FC8F5-9E74-45EA-B0C3-96498F989807}.Release|Any CPU.Build.0 = Release|Any CPU
		{B41C3F48-055F-4F75-9573-2890FF27D75F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B41C3F48-055F-4F75-9573-2890FF27D75F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B41C3F48-055F-4F75-9573-2890FF27D75F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B41C3F48-055F-4F75-9573-2890FF27D75F}.Release|Any CPU.Build.0 = Release|Any CPU
		{CC01B944-CD53-4B3A-9734-A2EFB977F337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{CC01B944-CD53-4B3A-9734-A2EFB977F337}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{CC01B944-CD53-4B3A-9734-A2EFB977F337}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{CC01B944-CD53-4B3A-9734-A2EFB977F337}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Program Manager
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions