Click here to Skip to main content
15,887,346 members
Articles / DevOps / Testing

Mocking Methods and Properties Using PostSharp

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
14 Aug 2012CPOL4 min read 19K   97   7  
Mock test without interface, on static methods and properties, using PostSharp

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCases", "TestCases\TestCases.csproj", "{6745AF04-356D-4A57-AF9B-920280673D7D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D02122E3-0886-4A91-B101-0282B78FE24D}"
	ProjectSection(SolutionItems) = preProject
		LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
		MockTest.vsmdi = MockTest.vsmdi
		MockTest1.vsmdi = MockTest1.vsmdi
		MockTest2.vsmdi = MockTest2.vsmdi
		MockTest3.vsmdi = MockTest3.vsmdi
		MockTest4.vsmdi = MockTest4.vsmdi
		MockTest5.vsmdi = MockTest5.vsmdi
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework", "Framework\Framework.csproj", "{D8B72BA6-8B5E-4D18-BE8E-CF3BF8E224A9}"
EndProject
Global
	GlobalSection(SubversionScc) = preSolution
		Svn-Managed = True
		Manager = AnkhSVN - Subversion Support for Visual Studio
	EndGlobalSection
	GlobalSection(TestCaseManagementSettings) = postSolution
		CategoryFile = MockTest5.vsmdi
	EndGlobalSection
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{6745AF04-356D-4A57-AF9B-920280673D7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{6745AF04-356D-4A57-AF9B-920280673D7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{6745AF04-356D-4A57-AF9B-920280673D7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{6745AF04-356D-4A57-AF9B-920280673D7D}.Release|Any CPU.Build.0 = Release|Any CPU
		{D8B72BA6-8B5E-4D18-BE8E-CF3BF8E224A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{D8B72BA6-8B5E-4D18-BE8E-CF3BF8E224A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{D8B72BA6-8B5E-4D18-BE8E-CF3BF8E224A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{D8B72BA6-8B5E-4D18-BE8E-CF3BF8E224A9}.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
Software Developer (Senior) 3PLearning
Australia Australia
Lead Developer, MMO Game Company
Testor, Microsoft

Comments and Discussions