nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01116
lp:~saidout/nunit-3.0/one-to-one-ratio-between-classes-and-files-in-constraint-namespace into lp:nunit-3.0
Said Outgajjouft has proposed merging lp:~saidout/nunit-3.0/one-to-one-ratio-between-classes-and-files-in-constraint-namespace into lp:nunit-3.0.
Requested reviews:
NUnit Core Developers (nunit-core)
In the Constraint namespace there is now a one-to-one ratio between files and classes.
In the solution added an OF for each of the old files that contained multiple classes that ended in an 's'.
OF = Organization Folder, which is a folder only used to organize files - don't affect the namespace of files located in them.
--
https://code.launchpad.net/~saidout/nunit-3.0/one-to-one-ratio-between-classes-and-files-in-constraint-namespace/+merge/36069
Your team NUnit Core Developers is requested to review the proposed merge of lp:~saidout/nunit-3.0/one-to-one-ratio-between-classes-and-files-in-constraint-namespace into lp:nunit-3.0.
=== modified file 'solutions/vs2010/NUnitFramework.sln'
--- solutions/vs2010/NUnitFramework.sln 2009-11-09 06:44:15 +0000
+++ solutions/vs2010/NUnitFramework.sln 2010-09-20 20:37:41 +0000
@@ -1,90 +1,90 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework", "nunit.framework\nunit.framework.csproj", "{F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite", "nunitlite\nunitlite.csproj", "{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-assembly", "test-assembly\test-assembly.csproj", "{3A0FAD44-A336-43D4-90D9-A5206EB6F02E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.tests", "nunit.framework.tests\nunit.framework.tests.csproj", "{F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-runner", "test-runner\test-runner.csproj", "{DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests", "nunitlite.tests\nunitlite.tests.csproj", "{477DCA46-A164-4A54-9B2B-2258F6DCBCD9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Any CPU.Build.0 = Release|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|x86.ActiveCfg = Release|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Any CPU.Build.0 = Release|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|x86.ActiveCfg = Release|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Any CPU.Build.0 = Release|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|x86.ActiveCfg = Release|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Any CPU.Build.0 = Release|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|x86.ActiveCfg = Release|Any CPU
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Any CPU.ActiveCfg = Debug|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|x86.ActiveCfg = Debug|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|x86.Build.0 = Debug|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Any CPU.ActiveCfg = Release|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Mixed Platforms.Build.0 = Release|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|x86.ActiveCfg = Release|x86
- {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|x86.Build.0 = Release|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Any CPU.ActiveCfg = Debug|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|x86.ActiveCfg = Debug|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|x86.Build.0 = Debug|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Any CPU.ActiveCfg = Release|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Mixed Platforms.Build.0 = Release|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|x86.ActiveCfg = Release|x86
- {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework", "nunit.framework\nunit.framework.csproj", "{F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite", "nunitlite\nunitlite.csproj", "{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-assembly", "test-assembly\test-assembly.csproj", "{3A0FAD44-A336-43D4-90D9-A5206EB6F02E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.tests", "nunit.framework.tests\nunit.framework.tests.csproj", "{F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-runner", "test-runner\test-runner.csproj", "{DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests", "nunitlite.tests\nunitlite.tests.csproj", "{477DCA46-A164-4A54-9B2B-2258F6DCBCD9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}.Release|x86.ActiveCfg = Release|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}.Release|x86.ActiveCfg = Release|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {3A0FAD44-A336-43D4-90D9-A5206EB6F02E}.Release|x86.ActiveCfg = Release|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {F74B8EB0-2FCC-4A78-9D50-FDC794CC0B38}.Release|x86.ActiveCfg = Release|Any CPU
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|x86.ActiveCfg = Debug|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Debug|x86.Build.0 = Debug|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Any CPU.ActiveCfg = Release|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|Mixed Platforms.Build.0 = Release|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|x86.ActiveCfg = Release|x86
+ {DFFF08BE-FB85-4A8C-81A0-6CF77DA20A5F}.Release|x86.Build.0 = Release|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|x86.ActiveCfg = Debug|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Debug|x86.Build.0 = Debug|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Any CPU.ActiveCfg = Release|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|Mixed Platforms.Build.0 = Release|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|x86.ActiveCfg = Release|x86
+ {477DCA46-A164-4A54-9B2B-2258F6DCBCD9}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
=== modified file 'solutions/vs2010/nunit.framework/nunit.framework.csproj'
--- solutions/vs2010/nunit.framework/nunit.framework.csproj 2010-08-29 16:03:15 +0000
+++ solutions/vs2010/nunit.framework/nunit.framework.csproj 2010-09-20 20:37:41 +0000
@@ -1,763 +1,907 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>NUnit.Framework</RootNamespace>
- <AssemblyName>nunit.framework</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>..\bin\Debug\nunit.framework.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\Release\</OutputPath>
- <DefineConstants>TRACE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>..\bin\Release\nunit.framework.XML</DocumentationFile>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <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.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
- <Link>CommonAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IApplyToTest.cs">
- <Link>Api\IApplyToTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IParameterDataSource.cs">
- <Link>Api\IParameterDataSource.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IPropertyBag.cs">
- <Link>Api\IPropertyBag.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITest.cs">
- <Link>Api\ITest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestAssemblyBuilder.cs">
- <Link>Api\ITestAssemblyBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestAssemblyRunner.cs">
- <Link>Api\ITestAssemblyRunner.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestCaseData.cs">
- <Link>Api\ITestCaseData.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestCaseSource.cs">
- <Link>Api\ITestCaseSource.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestListener.cs">
- <Link>Api\ITestListener.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestResult.cs">
- <Link>Api\ITestResult.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IXmlNodeBuilder.cs">
- <Link>Api\IXmlNodeBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\PropertyEntry.cs">
- <Link>Api\PropertyEntry.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\PropertyNames.cs">
- <Link>Api\PropertyNames.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ResultState.cs">
- <Link>Api\ResultState.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\RunState.cs">
- <Link>Api\RunState.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\TestController.cs">
- <Link>Api\TestController.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\TestOutput.cs">
- <Link>Api\TestOutput.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\TestStatus.cs">
- <Link>Api\TestStatus.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\AssemblyInfo.cs">
- <Link>AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Assert.cs">
- <Link>Assert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\AssertionHelper.cs">
- <Link>AssertionHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Assume.cs">
- <Link>Assume.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\CategoryAttribute.cs">
- <Link>Attributes\CategoryAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\CombinatorialAttribute.cs">
- <Link>Attributes\CombinatorialAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\CultureAttribute.cs">
- <Link>Attributes\CultureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DataAttribute.cs">
- <Link>Attributes\DataAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DatapointAttribute.cs">
- <Link>Attributes\DatapointAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DatapointsAttribute.cs">
- <Link>Attributes\DatapointsAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DatapointSourceAttribute.cs">
- <Link>Attributes\DatapointSourceAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DescriptionAttribute.cs">
- <Link>Attributes\DescriptionAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\ExpectedExceptionAttribute.cs">
- <Link>Attributes\ExpectedExceptionAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\ExplicitAttribute.cs">
- <Link>Attributes\ExplicitAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\IgnoreAttribute.cs">
- <Link>Attributes\IgnoreAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\IncludeExcludeAttribute.cs">
- <Link>Attributes\IncludeExcludeAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\MaxTimeAttribute.cs">
- <Link>Attributes\MaxTimeAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\NUnitAttribute.cs">
- <Link>Attributes\NUnitAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\PairwiseAttribute.cs">
- <Link>Attributes\PairwiseAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\PlatformAttribute.cs">
- <Link>Attributes\PlatformAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\PropertyAttribute.cs">
- <Link>Attributes\PropertyAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RandomAttribute.cs">
- <Link>Attributes\RandomAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RangeAttribute.cs">
- <Link>Attributes\RangeAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RepeatAttribute.cs">
- <Link>Attributes\RepeatAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RequiredAddinAttribute.cs">
- <Link>Attributes\RequiredAddinAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RequiresMTAAtribute.cs">
- <Link>Attributes\RequiresMTAAtribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RequiresSTAAttribute.cs">
- <Link>Attributes\RequiresSTAAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\RequiresThreadAttribute.cs">
- <Link>Attributes\RequiresThreadAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SequentialAttribute.cs">
- <Link>Attributes\SequentialAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SetCultureAttribute.cs">
- <Link>Attributes\SetCultureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SetUICultureAttribute.cs">
- <Link>Attributes\SetUICultureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SetUpAttribute.cs">
- <Link>Attributes\SetUpAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SetUpFixtureAttribute.cs">
- <Link>Attributes\SetUpFixtureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SuiteAttribute.cs">
- <Link>Attributes\SuiteAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TearDownAttribute.cs">
- <Link>Attributes\TearDownAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestAttribute.cs">
- <Link>Attributes\TestAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestCaseAttribute.cs">
- <Link>Attributes\TestCaseAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestCaseSourceAttribute.cs">
- <Link>Attributes\TestCaseSourceAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestFixtureAttribute.cs">
- <Link>Attributes\TestFixtureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestFixtureSetUpAttribute.cs">
- <Link>Attributes\TestFixtureSetUpAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestFixtureTearDownAttribute.cs">
- <Link>Attributes\TestFixtureTearDownAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestModificationAttribute.cs">
- <Link>Attributes\TestModificationAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TheoryAttribute.cs">
- <Link>Attributes\TheoryAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TimeoutAttribute.cs">
- <Link>Attributes\TimeoutAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\ValuesAttribute.cs">
- <Link>Attributes\ValuesAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\ValueSourceAttribute.cs">
- <Link>Attributes\ValueSourceAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\CollectionAssert.cs">
- <Link>CollectionAssert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\AttributeConstraints.cs">
- <Link>Constraints\AttributeConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BasicConstraints.cs">
- <Link>Constraints\BasicConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BinaryOperations.cs">
- <Link>Constraints\BinaryOperations.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BinarySerializableConstraint.cs">
- <Link>Constraints\BinarySerializableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\CollectionConstraints.cs">
- <Link>Constraints\CollectionConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\CollectionTally.cs">
- <Link>Constraints\CollectionTally.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ComparisonAdapter.cs">
- <Link>Constraints\ComparisonAdapter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ComparisonConstraints.cs">
- <Link>Constraints\ComparisonConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Constraint.cs">
- <Link>Constraints\Constraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintBuilder.cs">
- <Link>Constraints\ConstraintBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpression.cs">
- <Link>Constraints\ConstraintExpression.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpressionBase.cs">
- <Link>Constraints\ConstraintExpressionBase.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintFactory.cs">
- <Link>Constraints\ConstraintFactory.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintOperators.cs">
- <Link>Constraints\ConstraintOperators.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ContainsConstraint.cs">
- <Link>Constraints\ContainsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\DelayedConstraint.cs">
- <Link>Constraints\DelayedConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EmptyConstraint.cs">
- <Link>Constraints\EmptyConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EmptyDirectoryConstraint.cs">
- <Link>Constraints\EmptyDirectoryConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EqualConstraint.cs">
- <Link>Constraints\EqualConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EqualityAdapter.cs">
- <Link>Constraints\EqualityAdapter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\FloatingPointNumerics.cs">
- <Link>Constraints\FloatingPointNumerics.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\IResolveConstraint.cs">
- <Link>Constraints\IResolveConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\MessageWriter.cs">
- <Link>Constraints\MessageWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\MsgUtils.cs">
- <Link>Constraints\MsgUtils.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Numerics.cs">
- <Link>Constraints\Numerics.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\NUnitComparer.cs">
- <Link>Constraints\NUnitComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\NUnitEqualityComparer.cs">
- <Link>Constraints\NUnitEqualityComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PathConstraints.cs">
- <Link>Constraints\PathConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PredicateConstraint.cs">
- <Link>Constraints\PredicateConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PrefixConstraints.cs">
- <Link>Constraints\PrefixConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PropertyConstraint.cs">
- <Link>Constraints\PropertyConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\RangeConstraint.cs">
- <Link>Constraints\RangeConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ResolvableConstraintExpression.cs">
- <Link>Constraints\ResolvableConstraintExpression.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ReusableConstraint.cs">
- <Link>Constraints\ReusableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\SameAsConstraint.cs">
- <Link>Constraints\SameAsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\StringConstraints.cs">
- <Link>Constraints\StringConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ThrowsConstraint.cs">
- <Link>Constraints\ThrowsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Tolerance.cs">
- <Link>Constraints\Tolerance.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\TypeConstraints.cs">
- <Link>Constraints\TypeConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\XmlSerializableConstraint.cs">
- <Link>Constraints\XmlSerializableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Contains.cs">
- <Link>Contains.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Env.cs">
- <Link>Env.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\AssertionException.cs">
- <Link>Exceptions\AssertionException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\IgnoreException.cs">
- <Link>Exceptions\IgnoreException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\InconclusiveException.cs">
- <Link>Exceptions\InconclusiveException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\SuccessException.cs">
- <Link>Exceptions\SuccessException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\Addin.cs">
- <Link>Extensibility\Addin.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\AddinStatus.cs">
- <Link>Extensibility\AddinStatus.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\ExtensionType.cs">
- <Link>Extensibility\ExtensionType.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\IAddin.cs">
- <Link>Extensibility\IAddin.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\IAddinRegistry.cs">
- <Link>Extensibility\IAddinRegistry.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\IDataPointProvider.cs">
- <Link>Extensibility\IDataPointProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\IExtensionHost.cs">
- <Link>Extensibility\IExtensionHost.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\IExtensionPoint.cs">
- <Link>Extensibility\IExtensionPoint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\ISuiteBuilder.cs">
- <Link>Extensibility\ISuiteBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\ITestCaseBuilder.cs">
- <Link>Extensibility\ITestCaseBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\ITestCaseProvider.cs">
- <Link>Extensibility\ITestCaseProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\ITestDecorator.cs">
- <Link>Extensibility\ITestDecorator.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\NUnitAddinAttribute.cs">
- <Link>Extensibility\NUnitAddinAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Extensibility\TestFramework.cs">
- <Link>Extensibility\TestFramework.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\FileAssert.cs">
- <Link>FileAssert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\GlobalSettings.cs">
- <Link>GlobalSettings.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Has.cs">
- <Link>Has.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\IExpectException.cs">
- <Link>IExpectException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\AssemblyHelper.cs">
- <Link>Internal\AssemblyHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\AssemblyReader.cs">
- <Link>Internal\AssemblyReader.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\AsyncResult.cs">
- <Link>Internal\AsyncResult.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\CombinatorialStrategy.cs">
- <Link>Internal\Builders\CombinatorialStrategy.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\CombinatorialTestCaseProvider.cs">
- <Link>Internal\Builders\CombinatorialTestCaseProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\CombiningStrategy.cs">
- <Link>Internal\Builders\CombiningStrategy.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\DataAttributeTestCaseProvider.cs">
- <Link>Internal\Builders\DataAttributeTestCaseProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\DatapointProvider.cs">
- <Link>Internal\Builders\DatapointProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\InlineDataPointProvider.cs">
- <Link>Internal\Builders\InlineDataPointProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\LegacySuiteBuilder.cs">
- <Link>Internal\Builders\LegacySuiteBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitTestCaseBuilder.cs">
- <Link>Internal\Builders\NUnitTestCaseBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitTestFixtureBuilder.cs">
- <Link>Internal\Builders\NUnitTestFixtureBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\PairwiseStrategy.cs">
- <Link>Internal\Builders\PairwiseStrategy.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\ProviderCache.cs">
- <Link>Internal\Builders\ProviderCache.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\ProviderInfo.cs">
- <Link>Internal\Builders\ProviderInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\SequentialStrategy.cs">
- <Link>Internal\Builders\SequentialStrategy.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\SetUpFixtureBuilder.cs">
- <Link>Internal\Builders\SetUpFixtureBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\ValueSourceProvider.cs">
- <Link>Internal\Builders\ValueSourceProvider.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\CommandBuilder.cs">
- <Link>Internal\Commands\CommandBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\DelegatingTestCommand.cs">
- <Link>Internal\Commands\DelegatingTestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\ExpectedExceptionCommand.cs">
- <Link>Internal\Commands\ExpectedExceptionCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\ITestCommand.cs">
- <Link>Internal\Commands\ITestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\MaxTimeCommand.cs">
- <Link>Internal\Commands\MaxTimeCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\RepeatedTestCommand.cs">
- <Link>Internal\Commands\RepeatedTestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\SetUpTearDownCommand.cs">
- <Link>Internal\Commands\SetUpTearDownCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\SkipCommand.cs">
- <Link>Internal\Commands\SkipCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestCaseCommand.cs">
- <Link>Internal\Commands\TestCaseCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestCommand.cs">
- <Link>Internal\Commands\TestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestExecutionContextCommand.cs">
- <Link>Internal\Commands\TestExecutionContextCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestGroupCommand.cs">
- <Link>Internal\Commands\TestGroupCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestMethodCommand.cs">
- <Link>Internal\Commands\TestMethodCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestSuiteCommand.cs">
- <Link>Internal\Commands\TestSuiteCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\ThreadedTestCommand.cs">
- <Link>Internal\Commands\ThreadedTestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\CoreExtensions.cs">
- <Link>Internal\CoreExtensions.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\CultureDetector.cs">
- <Link>Internal\CultureDetector.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\DefaultTestAssemblyBuilder.cs">
- <Link>Internal\DefaultTestAssemblyBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\DefaultTestAssemblyRunner.cs">
- <Link>Internal\DefaultTestAssemblyRunner.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\DirectorySwapper.cs">
- <Link>Internal\DirectorySwapper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\EventListenerTextWriter.cs">
- <Link>Internal\EventListenerTextWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\EventPump.cs">
- <Link>Internal\EventPump.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\EventQueue.cs">
- <Link>Internal\EventQueue.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ExceptionHelper.cs">
- <Link>Internal\ExceptionHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ExpectedExceptionProcessor.cs">
- <Link>Internal\ExpectedExceptionProcessor.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\DataPointProviders.cs">
- <Link>Internal\Extensibility\DataPointProviders.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\EventListenerCollection.cs">
- <Link>Internal\Extensibility\EventListenerCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionHost.cs">
- <Link>Internal\Extensibility\ExtensionHost.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionPoint.cs">
- <Link>Internal\Extensibility\ExtensionPoint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionsCollection.cs">
- <Link>Internal\Extensibility\ExtensionsCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\SuiteBuilderCollection.cs">
- <Link>Internal\Extensibility\SuiteBuilderCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestCaseBuilderCollection.cs">
- <Link>Internal\Extensibility\TestCaseBuilderCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestCaseProviders.cs">
- <Link>Internal\Extensibility\TestCaseProviders.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestDecoratorCollection.cs">
- <Link>Internal\Extensibility\TestDecoratorCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\InternalTrace.cs">
- <Link>Internal\InternalTrace.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\InvalidTestFixtureException.cs">
- <Link>Internal\InvalidTestFixtureException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Log4NetCapture.cs">
- <Link>Internal\Log4NetCapture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\LogCapture.cs">
- <Link>Internal\LogCapture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\MethodHelper.cs">
- <Link>Internal\MethodHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\NamespaceTreeBuilder.cs">
- <Link>Internal\NamespaceTreeBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\NUnitException.cs">
- <Link>Internal\NUnitException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\OSPlatform.cs">
- <Link>Internal\OSPlatform.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ParameterSet.cs">
- <Link>Internal\ParameterSet.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\PlatformHelper.cs">
- <Link>Internal\PlatformHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\PropertyBag.cs">
- <Link>Internal\PropertyBag.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\QueuingEventListener.cs">
- <Link>Internal\QueuingEventListener.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Randomizer.cs">
- <Link>Internal\Randomizer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Reflect.cs">
- <Link>Internal\Reflect.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\RuntimeFramework.cs">
- <Link>Internal\RuntimeFramework.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestExecutionContext.cs" />
- <Compile Include="..\..\..\src\framework\Internal\TestFixtureBuilder.cs">
- <Link>Internal\TestFixtureBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestListener.cs">
- <Link>Internal\TestListener.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestProgressReporter.cs">
- <Link>Internal\TestProgressReporter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestResult.cs">
- <Link>Internal\TestResult.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\LegacySuite.cs">
- <Link>Internal\Tests\LegacySuite.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedFixtureSuite.cs">
- <Link>Internal\Tests\ParameterizedFixtureSuite.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedMethodSuite.cs">
- <Link>Internal\Tests\ParameterizedMethodSuite.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\SetUpFixture.cs">
- <Link>Internal\Tests\SetUpFixture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\Test.cs">
- <Link>Internal\Tests\Test.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestAssembly.cs">
- <Link>Internal\Tests\TestAssembly.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestFixture.cs">
- <Link>Internal\Tests\TestFixture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestMethod.cs">
- <Link>Internal\Tests\TestMethod.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestSuite.cs">
- <Link>Internal\Tests\TestSuite.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TextCapture.cs">
- <Link>Internal\TextCapture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TextMessageWriter.cs">
- <Link>Internal\TextMessageWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TypeHelper.cs">
- <Link>Internal\TypeHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\XmlHelper.cs">
- <Link>Internal\XmlHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Is.cs">
- <Link>Is.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Iz.cs">
- <Link>Iz.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\List.cs">
- <Link>List.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\ListMapper.cs">
- <Link>ListMapper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\MessageMatch.cs">
- <Link>MessageMatch.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\ObjectList.cs">
- <Link>ObjectList.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\SpecialValue.cs">
- <Link>SpecialValue.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\StringAssert.cs">
- <Link>StringAssert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\TestCaseData.cs">
- <Link>TestCaseData.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\TestContext.cs">
- <Link>TestContext.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Throws.cs">
- <Link>Throws.cs</Link>
- </Compile>
- <None Include="..\..\..\src\framework\Templates\Contains.template.cs">
- <Link>Templates\Contains.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Assert.template.cs">
- <Link>Templates\Assert.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\ConstraintExpression.template.cs">
- <Link>Templates\ConstraintExpression.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\ConstraintFactory.template.cs">
- <Link>Templates\ConstraintFactory.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Has.template.cs">
- <Link>Templates\Has.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Is.template.cs">
- <Link>Templates\Is.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Throws.template.cs">
- <Link>Templates\Throws.template.cs</Link>
- </None>
- <None Include="nunit.snk" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="..\..\..\src\framework\SyntaxElements.txt">
- <Link>SyntaxElements.txt</Link>
- </Content>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F55F0FC4-E9B8-4D3C-B499-2FBB1E7C1D09}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunit.framework</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\bin\Debug\nunit.framework.XML</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\bin\Release\nunit.framework.XML</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.configuration" />
+ <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.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
+ <Link>CommonAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IApplyToTest.cs">
+ <Link>Api\IApplyToTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IParameterDataSource.cs">
+ <Link>Api\IParameterDataSource.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IPropertyBag.cs">
+ <Link>Api\IPropertyBag.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITest.cs">
+ <Link>Api\ITest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestAssemblyBuilder.cs">
+ <Link>Api\ITestAssemblyBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestAssemblyRunner.cs">
+ <Link>Api\ITestAssemblyRunner.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestCaseData.cs">
+ <Link>Api\ITestCaseData.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestCaseSource.cs">
+ <Link>Api\ITestCaseSource.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestListener.cs">
+ <Link>Api\ITestListener.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestResult.cs">
+ <Link>Api\ITestResult.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IXmlNodeBuilder.cs">
+ <Link>Api\IXmlNodeBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\PropertyEntry.cs">
+ <Link>Api\PropertyEntry.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\PropertyNames.cs">
+ <Link>Api\PropertyNames.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ResultState.cs">
+ <Link>Api\ResultState.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\RunState.cs">
+ <Link>Api\RunState.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\TestController.cs">
+ <Link>Api\TestController.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\TestOutput.cs">
+ <Link>Api\TestOutput.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\TestStatus.cs">
+ <Link>Api\TestStatus.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Assert.cs">
+ <Link>Assert.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\AssertionHelper.cs">
+ <Link>AssertionHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Assume.cs">
+ <Link>Assume.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\CategoryAttribute.cs">
+ <Link>Attributes\CategoryAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\CombinatorialAttribute.cs">
+ <Link>Attributes\CombinatorialAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\CultureAttribute.cs">
+ <Link>Attributes\CultureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DataAttribute.cs">
+ <Link>Attributes\DataAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DatapointAttribute.cs">
+ <Link>Attributes\DatapointAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DatapointsAttribute.cs">
+ <Link>Attributes\DatapointsAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DatapointSourceAttribute.cs">
+ <Link>Attributes\DatapointSourceAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DescriptionAttribute.cs">
+ <Link>Attributes\DescriptionAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\ExpectedExceptionAttribute.cs">
+ <Link>Attributes\ExpectedExceptionAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\ExplicitAttribute.cs">
+ <Link>Attributes\ExplicitAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\IgnoreAttribute.cs">
+ <Link>Attributes\IgnoreAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\IncludeExcludeAttribute.cs">
+ <Link>Attributes\IncludeExcludeAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\MaxTimeAttribute.cs">
+ <Link>Attributes\MaxTimeAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\NUnitAttribute.cs">
+ <Link>Attributes\NUnitAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\PairwiseAttribute.cs">
+ <Link>Attributes\PairwiseAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\PlatformAttribute.cs">
+ <Link>Attributes\PlatformAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\PropertyAttribute.cs">
+ <Link>Attributes\PropertyAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RandomAttribute.cs">
+ <Link>Attributes\RandomAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RangeAttribute.cs">
+ <Link>Attributes\RangeAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RepeatAttribute.cs">
+ <Link>Attributes\RepeatAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RequiredAddinAttribute.cs">
+ <Link>Attributes\RequiredAddinAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RequiresMTAAtribute.cs">
+ <Link>Attributes\RequiresMTAAtribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RequiresSTAAttribute.cs">
+ <Link>Attributes\RequiresSTAAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\RequiresThreadAttribute.cs">
+ <Link>Attributes\RequiresThreadAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SequentialAttribute.cs">
+ <Link>Attributes\SequentialAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SetCultureAttribute.cs">
+ <Link>Attributes\SetCultureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SetUICultureAttribute.cs">
+ <Link>Attributes\SetUICultureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SetUpAttribute.cs">
+ <Link>Attributes\SetUpAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SetUpFixtureAttribute.cs">
+ <Link>Attributes\SetUpFixtureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SuiteAttribute.cs">
+ <Link>Attributes\SuiteAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TearDownAttribute.cs">
+ <Link>Attributes\TearDownAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestAttribute.cs">
+ <Link>Attributes\TestAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestCaseAttribute.cs">
+ <Link>Attributes\TestCaseAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestCaseSourceAttribute.cs">
+ <Link>Attributes\TestCaseSourceAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestFixtureAttribute.cs">
+ <Link>Attributes\TestFixtureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestFixtureSetUpAttribute.cs">
+ <Link>Attributes\TestFixtureSetUpAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestFixtureTearDownAttribute.cs">
+ <Link>Attributes\TestFixtureTearDownAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestModificationAttribute.cs">
+ <Link>Attributes\TestModificationAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TheoryAttribute.cs">
+ <Link>Attributes\TheoryAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TimeoutAttribute.cs">
+ <Link>Attributes\TimeoutAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\ValuesAttribute.cs">
+ <Link>Attributes\ValuesAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\ValueSourceAttribute.cs">
+ <Link>Attributes\ValueSourceAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\CollectionAssert.cs">
+ <Link>CollectionAssert.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AllItemsConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\AllItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AndConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\AndConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AndOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\AndOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AssignableFromConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\AssignableFromConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AssignableToConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\AssignableToConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeConstraint.cs">
+ <Link>Constraints\OF-AttributeConstraint\AttributeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeExistsConstraint.cs">
+ <Link>Constraints\OF-AttributeConstraint\AttributeExistsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\AttributeOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BasicConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\BasicConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinaryConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\BinaryConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinaryOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\BinaryOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinarySerializableConstraint.cs">
+ <Link>Constraints\BinarySerializableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionContainsConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionContainsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionEquivalentConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionEquivalentConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionItemsEqualConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionItemsEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\CollectionOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionOrderedConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionOrderedConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionSubsetConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionSubsetConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionTally.cs">
+ <Link>Constraints\CollectionTally.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ComparisonAdapter.cs">
+ <Link>Constraints\ComparisonAdapter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ComparisonConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\ComparisonConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Constraint.cs">
+ <Link>Constraints\Constraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintBuilder.cs">
+ <Link>Constraints\ConstraintBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpression.cs">
+ <Link>Constraints\ConstraintExpression.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpressionBase.cs">
+ <Link>Constraints\ConstraintExpressionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintFactory.cs">
+ <Link>Constraints\ConstraintFactory.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\ConstraintOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ContainsConstraint.cs">
+ <Link>Constraints\ContainsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\DelayedConstraint.cs">
+ <Link>Constraints\DelayedConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyCollectionConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\EmptyCollectionConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyConstraint.cs">
+ <Link>Constraints\EmptyConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyDirectoryConstraint.cs">
+ <Link>Constraints\EmptyDirectoryConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyStringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\EmptyStringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EndsWithConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\EndsWithConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EqualConstraint.cs">
+ <Link>Constraints\EqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EqualityAdapter.cs">
+ <Link>Constraints\EqualityAdapter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ExactTypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\ExactTypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\FalseConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\FalseConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\FloatingPointNumerics.cs">
+ <Link>Constraints\FloatingPointNumerics.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\GreaterThanConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\GreaterThanConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\GreaterThanOrEqualConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\GreaterThanOrEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\InstanceOfTypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\InstanceOfTypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\IResolveConstraint.cs">
+ <Link>Constraints\IResolveConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\LessThanConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\LessThanConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\LessThanOrEqualConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\LessThanOrEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\MessageWriter.cs">
+ <Link>Constraints\MessageWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\MsgUtils.cs">
+ <Link>Constraints\MsgUtils.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NaNConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\NaNConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NoItemConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\NoItemConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NotConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\NotConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NotOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\NotOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NullConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\NullConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NullOrEmptyStringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\NullOrEmptyStringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Numerics.cs">
+ <Link>Constraints\Numerics.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NUnitComparer.cs">
+ <Link>Constraints\NUnitComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NUnitEqualityComparer.cs">
+ <Link>Constraints\NUnitEqualityComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\OrConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\OrConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\OrOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\OrOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PathConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\PathConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PredicateConstraint.cs">
+ <Link>Constraints\PredicateConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PrefixConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\PrefixConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PrefixOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\PrefixOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropertyConstraint.cs">
+ <Link>Constraints\PropertyConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropertyExistsConstraint.cs">
+ <Link>Constraints\PropertyExistsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\PropOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\RangeConstraint.cs">
+ <Link>Constraints\RangeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\RegexConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\RegexConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ResolvableConstraintExpression.cs">
+ <Link>Constraints\ResolvableConstraintExpression.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ReusableConstraint.cs">
+ <Link>Constraints\ReusableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SameAsConstraint.cs">
+ <Link>Constraints\SameAsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SamePathConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\SamePathConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SamePathOrUnderConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\SamePathOrUnderConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SelfResolvingOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\SelfResolvingOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SomeItemsConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\SomeItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\StartsWithConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\StartsWithConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\StringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\StringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SubstringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\SubstringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsConstraint.cs">
+ <Link>Constraints\ThrowsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsNothingConstraint.cs">
+ <Link>Constraints\ThrowsNothingConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\ThrowsOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Tolerance.cs">
+ <Link>Constraints\Tolerance.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ToleranceMode.cs">
+ <Link>Constraints\ToleranceMode.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\TrueConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\TrueConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\TypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\TypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\UniqueItemsConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\UniqueItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\WithOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\WithOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\XmlSerializableConstraint.cs">
+ <Link>Constraints\XmlSerializableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Contains.cs">
+ <Link>Contains.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Env.cs">
+ <Link>Env.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\AssertionException.cs">
+ <Link>Exceptions\AssertionException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\IgnoreException.cs">
+ <Link>Exceptions\IgnoreException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\InconclusiveException.cs">
+ <Link>Exceptions\InconclusiveException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\SuccessException.cs">
+ <Link>Exceptions\SuccessException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\Addin.cs">
+ <Link>Extensibility\Addin.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\AddinStatus.cs">
+ <Link>Extensibility\AddinStatus.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\ExtensionType.cs">
+ <Link>Extensibility\ExtensionType.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\IAddin.cs">
+ <Link>Extensibility\IAddin.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\IAddinRegistry.cs">
+ <Link>Extensibility\IAddinRegistry.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\IDataPointProvider.cs">
+ <Link>Extensibility\IDataPointProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\IExtensionHost.cs">
+ <Link>Extensibility\IExtensionHost.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\IExtensionPoint.cs">
+ <Link>Extensibility\IExtensionPoint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\ISuiteBuilder.cs">
+ <Link>Extensibility\ISuiteBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\ITestCaseBuilder.cs">
+ <Link>Extensibility\ITestCaseBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\ITestCaseProvider.cs">
+ <Link>Extensibility\ITestCaseProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\ITestDecorator.cs">
+ <Link>Extensibility\ITestDecorator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\NUnitAddinAttribute.cs">
+ <Link>Extensibility\NUnitAddinAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Extensibility\TestFramework.cs">
+ <Link>Extensibility\TestFramework.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\FileAssert.cs">
+ <Link>FileAssert.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\GlobalSettings.cs">
+ <Link>GlobalSettings.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Has.cs">
+ <Link>Has.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\IExpectException.cs">
+ <Link>IExpectException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\AssemblyHelper.cs">
+ <Link>Internal\AssemblyHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\AssemblyReader.cs">
+ <Link>Internal\AssemblyReader.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\AsyncResult.cs">
+ <Link>Internal\AsyncResult.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\CombinatorialStrategy.cs">
+ <Link>Internal\Builders\CombinatorialStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <Link>Internal\Builders\CombinatorialTestCaseProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\CombiningStrategy.cs">
+ <Link>Internal\Builders\CombiningStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <Link>Internal\Builders\DataAttributeTestCaseProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\DatapointProvider.cs">
+ <Link>Internal\Builders\DatapointProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\InlineDataPointProvider.cs">
+ <Link>Internal\Builders\InlineDataPointProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\LegacySuiteBuilder.cs">
+ <Link>Internal\Builders\LegacySuiteBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitTestCaseBuilder.cs">
+ <Link>Internal\Builders\NUnitTestCaseBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitTestFixtureBuilder.cs">
+ <Link>Internal\Builders\NUnitTestFixtureBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\PairwiseStrategy.cs">
+ <Link>Internal\Builders\PairwiseStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\ProviderCache.cs">
+ <Link>Internal\Builders\ProviderCache.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\ProviderInfo.cs">
+ <Link>Internal\Builders\ProviderInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\SequentialStrategy.cs">
+ <Link>Internal\Builders\SequentialStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\SetUpFixtureBuilder.cs">
+ <Link>Internal\Builders\SetUpFixtureBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\ValueSourceProvider.cs">
+ <Link>Internal\Builders\ValueSourceProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\CommandBuilder.cs">
+ <Link>Internal\Commands\CommandBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\DelegatingTestCommand.cs">
+ <Link>Internal\Commands\DelegatingTestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\ExpectedExceptionCommand.cs">
+ <Link>Internal\Commands\ExpectedExceptionCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\ITestCommand.cs">
+ <Link>Internal\Commands\ITestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\MaxTimeCommand.cs">
+ <Link>Internal\Commands\MaxTimeCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\RepeatedTestCommand.cs">
+ <Link>Internal\Commands\RepeatedTestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\SetUpTearDownCommand.cs">
+ <Link>Internal\Commands\SetUpTearDownCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\SkipCommand.cs">
+ <Link>Internal\Commands\SkipCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestCaseCommand.cs">
+ <Link>Internal\Commands\TestCaseCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestCommand.cs">
+ <Link>Internal\Commands\TestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestExecutionContextCommand.cs">
+ <Link>Internal\Commands\TestExecutionContextCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestGroupCommand.cs">
+ <Link>Internal\Commands\TestGroupCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestMethodCommand.cs">
+ <Link>Internal\Commands\TestMethodCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestSuiteCommand.cs">
+ <Link>Internal\Commands\TestSuiteCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\ThreadedTestCommand.cs">
+ <Link>Internal\Commands\ThreadedTestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\CoreExtensions.cs">
+ <Link>Internal\CoreExtensions.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\CultureDetector.cs">
+ <Link>Internal\CultureDetector.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\DefaultTestAssemblyBuilder.cs">
+ <Link>Internal\DefaultTestAssemblyBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\DefaultTestAssemblyRunner.cs">
+ <Link>Internal\DefaultTestAssemblyRunner.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\DirectorySwapper.cs">
+ <Link>Internal\DirectorySwapper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\EventListenerTextWriter.cs">
+ <Link>Internal\EventListenerTextWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\EventPump.cs">
+ <Link>Internal\EventPump.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\EventQueue.cs">
+ <Link>Internal\EventQueue.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ExceptionHelper.cs">
+ <Link>Internal\ExceptionHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ExpectedExceptionProcessor.cs">
+ <Link>Internal\ExpectedExceptionProcessor.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\DataPointProviders.cs">
+ <Link>Internal\Extensibility\DataPointProviders.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\EventListenerCollection.cs">
+ <Link>Internal\Extensibility\EventListenerCollection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionHost.cs">
+ <Link>Internal\Extensibility\ExtensionHost.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionPoint.cs">
+ <Link>Internal\Extensibility\ExtensionPoint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\ExtensionsCollection.cs">
+ <Link>Internal\Extensibility\ExtensionsCollection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\SuiteBuilderCollection.cs">
+ <Link>Internal\Extensibility\SuiteBuilderCollection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestCaseBuilderCollection.cs">
+ <Link>Internal\Extensibility\TestCaseBuilderCollection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestCaseProviders.cs">
+ <Link>Internal\Extensibility\TestCaseProviders.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Extensibility\TestDecoratorCollection.cs">
+ <Link>Internal\Extensibility\TestDecoratorCollection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\InternalTrace.cs">
+ <Link>Internal\InternalTrace.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\InvalidTestFixtureException.cs">
+ <Link>Internal\InvalidTestFixtureException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Log4NetCapture.cs">
+ <Link>Internal\Log4NetCapture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\LogCapture.cs">
+ <Link>Internal\LogCapture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\MethodHelper.cs">
+ <Link>Internal\MethodHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\NamespaceTreeBuilder.cs">
+ <Link>Internal\NamespaceTreeBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\NUnitException.cs">
+ <Link>Internal\NUnitException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\OSPlatform.cs">
+ <Link>Internal\OSPlatform.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ParameterSet.cs">
+ <Link>Internal\ParameterSet.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\PlatformHelper.cs">
+ <Link>Internal\PlatformHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\PropertyBag.cs">
+ <Link>Internal\PropertyBag.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\QueuingEventListener.cs">
+ <Link>Internal\QueuingEventListener.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Randomizer.cs">
+ <Link>Internal\Randomizer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Reflect.cs">
+ <Link>Internal\Reflect.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\RuntimeFramework.cs">
+ <Link>Internal\RuntimeFramework.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestExecutionContext.cs" />
+ <Compile Include="..\..\..\src\framework\Internal\TestFixtureBuilder.cs">
+ <Link>Internal\TestFixtureBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestListener.cs">
+ <Link>Internal\TestListener.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestProgressReporter.cs">
+ <Link>Internal\TestProgressReporter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestResult.cs">
+ <Link>Internal\TestResult.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\LegacySuite.cs">
+ <Link>Internal\Tests\LegacySuite.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedFixtureSuite.cs">
+ <Link>Internal\Tests\ParameterizedFixtureSuite.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedMethodSuite.cs">
+ <Link>Internal\Tests\ParameterizedMethodSuite.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\SetUpFixture.cs">
+ <Link>Internal\Tests\SetUpFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\Test.cs">
+ <Link>Internal\Tests\Test.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestAssembly.cs">
+ <Link>Internal\Tests\TestAssembly.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestFixture.cs">
+ <Link>Internal\Tests\TestFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestMethod.cs">
+ <Link>Internal\Tests\TestMethod.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestSuite.cs">
+ <Link>Internal\Tests\TestSuite.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TextCapture.cs">
+ <Link>Internal\TextCapture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TextMessageWriter.cs">
+ <Link>Internal\TextMessageWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TypeHelper.cs">
+ <Link>Internal\TypeHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\XmlHelper.cs">
+ <Link>Internal\XmlHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Is.cs">
+ <Link>Is.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Iz.cs">
+ <Link>Iz.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\List.cs">
+ <Link>List.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\ListMapper.cs">
+ <Link>ListMapper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\MessageMatch.cs">
+ <Link>MessageMatch.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\ObjectList.cs">
+ <Link>ObjectList.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\SpecialValue.cs">
+ <Link>SpecialValue.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\StringAssert.cs">
+ <Link>StringAssert.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\TestCaseData.cs">
+ <Link>TestCaseData.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\TestContext.cs">
+ <Link>TestContext.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Throws.cs">
+ <Link>Throws.cs</Link>
+ </Compile>
+ <None Include="..\..\..\src\framework\Templates\Contains.template.cs">
+ <Link>Templates\Contains.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Assert.template.cs">
+ <Link>Templates\Assert.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\ConstraintExpression.template.cs">
+ <Link>Templates\ConstraintExpression.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\ConstraintFactory.template.cs">
+ <Link>Templates\ConstraintFactory.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Has.template.cs">
+ <Link>Templates\Has.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Is.template.cs">
+ <Link>Templates\Is.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Throws.template.cs">
+ <Link>Templates\Throws.template.cs</Link>
+ </None>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="..\..\..\src\framework\SyntaxElements.txt">
+ <Link>SyntaxElements.txt</Link>
+ </Content>
+ </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>
\ No newline at end of file
=== modified file 'solutions/vs2010/nunitlite.tests/nunitlite.tests.csproj'
--- solutions/vs2010/nunitlite.tests/nunitlite.tests.csproj 2010-08-17 19:05:05 +0000
+++ solutions/vs2010/nunitlite.tests/nunitlite.tests.csproj 2010-09-20 20:37:41 +0000
@@ -1,238 +1,241 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{477DCA46-A164-4A54-9B2B-2258F6DCBCD9}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>NUnitLite.Tests</RootNamespace>
- <AssemblyName>nunitlite.tests</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <TargetFrameworkProfile>Client</TargetFrameworkProfile>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\Release\</OutputPath>
- <DefineConstants>TRACE;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
- <Link>CommonAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\AlwaysEqualComparer.cs">
- <Link>AlwaysEqualComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\ArrayEqualsFailureMessageFixture.cs">
- <Link>Assertions\ArrayEqualsFailureMessageFixture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\ArrayEqualsFixture.cs">
- <Link>Assertions\ArrayEqualsFixture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\ArrayNotEqualFixture.cs">
- <Link>Assertions\ArrayNotEqualFixture.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\AssertFailTests.cs">
- <Link>Assertions\AssertFailTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\AssertIgnoreTests.cs">
- <Link>Assertions\AssertIgnoreTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\AssertInconclusiveTests.cs">
- <Link>Assertions\AssertInconclusiveTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\AssertPassTests.cs">
- <Link>Assertions\AssertPassTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Assertions\MessageChecker.cs">
- <Link>Assertions\MessageChecker.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Attributes\TestFixtureAttributeTests.cs">
- <Link>Attributes\TestFixtureAttributeTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\CollectionAdapter.cs">
- <Link>CollectionAdapter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\AndTest.cs">
- <Link>Constraints\AndTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\BasicConstraintTests.cs">
- <Link>Constraints\BasicConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\BinarySerializableTest.cs">
- <Link>Constraints\BinarySerializableTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\CollectionConstraintTests.cs">
- <Link>Constraints\CollectionConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\ComparerTests.cs">
- <Link>Constraints\ComparerTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\ComparisonConstraintTests.cs">
- <Link>Constraints\ComparisonConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\ConstraintTestBase.cs">
- <Link>Constraints\ConstraintTestBase.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\EmptyConstraintTest.cs">
- <Link>Constraints\EmptyConstraintTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\EqualTest.cs">
- <Link>Constraints\EqualTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\FloatingPointNumericsTest.cs">
- <Link>Constraints\FloatingPointNumericsTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\MsgUtilTests.cs">
- <Link>Constraints\MsgUtilTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\NotTest.cs">
- <Link>Constraints\NotTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\NumericsTest.cs">
- <Link>Constraints\NumericsTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\OrTest.cs">
- <Link>Constraints\OrTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\PathConstraintTests.cs">
- <Link>Constraints\PathConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\PropertyTests.cs">
- <Link>Constraints\PropertyTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\SameAsTest.cs">
- <Link>Constraints\SameAsTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\StringConstraintTests.cs">
- <Link>Constraints\StringConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\ThrowsConstraintTests.cs">
- <Link>Constraints\ThrowsConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\ToStringTests.cs">
- <Link>Constraints\ToStringTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\TypeConstraintTests.cs">
- <Link>Constraints\TypeConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Constraints\XmlSerializableTest.cs">
- <Link>Constraints\XmlSerializableTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Internal\PropertyBagTests.cs">
- <Link>Internal\PropertyBagTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Internal\TestXmlTests.cs">
- <Link>Internal\TestXmlTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Internal\TextMessageWriterTests.cs">
- <Link>Internal\TextMessageWriterTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Program.cs">
- <Link>Program.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\CollectionTests.cs">
- <Link>Syntax\CollectionTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\ComparisonTests.cs">
- <Link>Syntax\ComparisonTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\EqualityTests.cs">
- <Link>Syntax\EqualityTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\OperatorOverrides.cs">
- <Link>Syntax\OperatorOverrides.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\OperatorTests.cs">
- <Link>Syntax\OperatorTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\PathConstraintTests.cs">
- <Link>Syntax\PathConstraintTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\PropertyTests.cs">
- <Link>Syntax\PropertyTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\SerializableConstraints.cs">
- <Link>Syntax\SerializableConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\SimpleConstraints.cs">
- <Link>Syntax\SimpleConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\StringConstraints.cs">
- <Link>Syntax\StringConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\SyntaxTest.cs">
- <Link>Syntax\SyntaxTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\ThrowsTests.cs">
- <Link>Syntax\ThrowsTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\Syntax\TypeConstraints.cs">
- <Link>Syntax\TypeConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\TestComparer.cs">
- <Link>TestComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\tests\TestDelegates.cs">
- <Link>TestDelegates.cs</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\nunitlite\nunitlite.csproj">
- <Project>{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}</Project>
- <Name>nunitlite</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="..\..\..\src\tests\TestImage1.jpg">
- <Link>TestImage1.jpg</Link>
- </EmbeddedResource>
- <EmbeddedResource Include="..\..\..\src\tests\TestImage2.jpg">
- <Link>TestImage2.jpg</Link>
- </EmbeddedResource>
- <EmbeddedResource Include="..\..\..\src\tests\TestText1.txt">
- <Link>TestText1.txt</Link>
- </EmbeddedResource>
- <EmbeddedResource Include="..\..\..\src\tests\TestText2.txt">
- <Link>TestText2.txt</Link>
- </EmbeddedResource>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{477DCA46-A164-4A54-9B2B-2258F6DCBCD9}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
+ <Link>CommonAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\AlwaysEqualComparer.cs">
+ <Link>AlwaysEqualComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\ArrayEqualsFailureMessageFixture.cs">
+ <Link>Assertions\ArrayEqualsFailureMessageFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\ArrayEqualsFixture.cs">
+ <Link>Assertions\ArrayEqualsFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\ArrayNotEqualFixture.cs">
+ <Link>Assertions\ArrayNotEqualFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\AssertFailTests.cs">
+ <Link>Assertions\AssertFailTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\AssertIgnoreTests.cs">
+ <Link>Assertions\AssertIgnoreTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\AssertInconclusiveTests.cs">
+ <Link>Assertions\AssertInconclusiveTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\AssertPassTests.cs">
+ <Link>Assertions\AssertPassTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Assertions\MessageChecker.cs">
+ <Link>Assertions\MessageChecker.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Attributes\TestFixtureAttributeTests.cs">
+ <Link>Attributes\TestFixtureAttributeTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\CollectionAdapter.cs">
+ <Link>CollectionAdapter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\AndTest.cs">
+ <Link>Constraints\AndTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\BasicConstraintTests.cs">
+ <Link>Constraints\BasicConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\BinarySerializableTest.cs">
+ <Link>Constraints\BinarySerializableTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\CollectionConstraintTests.cs">
+ <Link>Constraints\CollectionConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\ComparerTests.cs">
+ <Link>Constraints\ComparerTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\ComparisonConstraintTests.cs">
+ <Link>Constraints\ComparisonConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\ConstraintTestBase.cs">
+ <Link>Constraints\ConstraintTestBase.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\EmptyConstraintTest.cs">
+ <Link>Constraints\EmptyConstraintTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\EqualTest.cs">
+ <Link>Constraints\EqualTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\FloatingPointNumericsTest.cs">
+ <Link>Constraints\FloatingPointNumericsTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\MsgUtilTests.cs">
+ <Link>Constraints\MsgUtilTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\NotTest.cs">
+ <Link>Constraints\NotTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\NumericsTest.cs">
+ <Link>Constraints\NumericsTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\OrTest.cs">
+ <Link>Constraints\OrTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\PathConstraintTests.cs">
+ <Link>Constraints\PathConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\PropertyTests.cs">
+ <Link>Constraints\PropertyTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\SameAsTest.cs">
+ <Link>Constraints\SameAsTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\StringConstraintTests.cs">
+ <Link>Constraints\StringConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\ThrowsConstraintTests.cs">
+ <Link>Constraints\ThrowsConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\ToStringTests.cs">
+ <Link>Constraints\ToStringTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\TypeConstraintTests.cs">
+ <Link>Constraints\TypeConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Constraints\XmlSerializableTest.cs">
+ <Link>Constraints\XmlSerializableTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Internal\PropertyBagTests.cs">
+ <Link>Internal\PropertyBagTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Internal\TestXmlTests.cs">
+ <Link>Internal\TestXmlTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Internal\TextMessageWriterTests.cs">
+ <Link>Internal\TextMessageWriterTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Program.cs">
+ <Link>Program.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\CollectionTests.cs">
+ <Link>Syntax\CollectionTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\ComparisonTests.cs">
+ <Link>Syntax\ComparisonTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\EqualityTests.cs">
+ <Link>Syntax\EqualityTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\OperatorOverrides.cs">
+ <Link>Syntax\OperatorOverrides.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\OperatorTests.cs">
+ <Link>Syntax\OperatorTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\PathConstraintTests.cs">
+ <Link>Syntax\PathConstraintTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\PropertyTests.cs">
+ <Link>Syntax\PropertyTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\SerializableConstraints.cs">
+ <Link>Syntax\SerializableConstraints.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\SimpleConstraints.cs">
+ <Link>Syntax\SimpleConstraints.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\StringConstraints.cs">
+ <Link>Syntax\StringConstraints.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\SyntaxTest.cs">
+ <Link>Syntax\SyntaxTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\ThrowsTests.cs">
+ <Link>Syntax\ThrowsTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\Syntax\TypeConstraints.cs">
+ <Link>Syntax\TypeConstraints.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\TestComparer.cs">
+ <Link>TestComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\tests\TestDelegates.cs">
+ <Link>TestDelegates.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\nunitlite\nunitlite.csproj">
+ <Project>{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}</Project>
+ <Name>nunitlite</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\..\..\src\tests\TestImage1.jpg">
+ <Link>TestImage1.jpg</Link>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\..\..\src\tests\TestImage2.jpg">
+ <Link>TestImage2.jpg</Link>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\..\..\src\tests\TestText1.txt">
+ <Link>TestText1.txt</Link>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\..\..\src\tests\TestText2.txt">
+ <Link>TestText2.txt</Link>
+ </EmbeddedResource>
+ </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>
\ No newline at end of file
=== modified file 'solutions/vs2010/nunitlite/nunitlite.csproj'
--- solutions/vs2010/nunitlite/nunitlite.csproj 2010-08-29 16:03:15 +0000
+++ solutions/vs2010/nunitlite/nunitlite.csproj 2010-09-20 20:37:41 +0000
@@ -1,524 +1,668 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>NUnitLite</RootNamespace>
- <AssemblyName>nunitlite</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>..\bin\Debug\nunitlite.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\Release\</OutputPath>
- <DefineConstants>TRACE;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>..\bin\Release\nunitlite.XML</DocumentationFile>
- </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.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
- <Link>CommonAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IApplyToTest.cs">
- <Link>Api\IApplyToTest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IPropertyBag.cs">
- <Link>Api\IPropertyBag.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITest.cs">
- <Link>Api\ITest.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestCaseData.cs">
- <Link>Api\ITestCaseData.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestCaseSource.cs">
- <Link>Api\ITestCaseSource.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestListener.cs">
- <Link>Api\ITestListener.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ITestResult.cs">
- <Link>Api\ITestResult.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\IXmlNodeBuilder.cs">
- <Link>Api\IXmlNodeBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\PropertyEntry.cs">
- <Link>Api\PropertyEntry.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\PropertyNames.cs">
- <Link>Api\PropertyNames.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\ResultState.cs">
- <Link>Api\ResultState.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\RunState.cs">
- <Link>Api\RunState.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\TestOutput.cs">
- <Link>Api\TestOutput.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Api\TestStatus.cs">
- <Link>Api\TestStatus.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\AssemblyInfo.cs">
- <Link>AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Assert.cs">
- <Link>Assert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\AssertionHelper.cs">
- <Link>AssertionHelper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\CategoryAttribute.cs">
- <Link>Attributes\CategoryAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DataAttribute.cs">
- <Link>Attributes\DataAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\DescriptionAttribute.cs">
- <Link>Attributes\DescriptionAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\ExpectedExceptionAttribute.cs">
- <Link>Attributes\ExpectedExceptionAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\IgnoreAttribute.cs">
- <Link>Attributes\IgnoreAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\NUnitAttribute.cs">
- <Link>Attributes\NUnitAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\PropertyAttribute.cs">
- <Link>Attributes\PropertyAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\SetUpAttribute.cs">
- <Link>Attributes\SetUpAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TearDownAttribute.cs">
- <Link>Attributes\TearDownAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestAttribute.cs">
- <Link>Attributes\TestAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestCaseAttribute.cs">
- <Link>Attributes\TestCaseAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestCaseSourceAttribute.cs">
- <Link>Attributes\TestCaseSourceAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestFixtureAttribute.cs">
- <Link>Attributes\TestFixtureAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Attributes\TestModificationAttribute.cs">
- <Link>Attributes\TestModificationAttribute.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\CompatibleCollections.cs">
- <Link>CompatibleCollections.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\AttributeConstraints.cs">
- <Link>Constraints\AttributeConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BasicConstraints.cs">
- <Link>Constraints\BasicConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BinaryOperations.cs">
- <Link>Constraints\BinaryOperations.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\BinarySerializableConstraint.cs">
- <Link>Constraints\BinarySerializableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\CollectionConstraints.cs">
- <Link>Constraints\CollectionConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\CollectionTally.cs">
- <Link>Constraints\CollectionTally.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ComparisonAdapter.cs">
- <Link>Constraints\ComparisonAdapter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ComparisonConstraints.cs">
- <Link>Constraints\ComparisonConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Constraint.cs">
- <Link>Constraints\Constraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintBuilder.cs">
- <Link>Constraints\ConstraintBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpression.cs">
- <Link>Constraints\ConstraintExpression.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpressionBase.cs">
- <Link>Constraints\ConstraintExpressionBase.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintFactory.cs">
- <Link>Constraints\ConstraintFactory.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ConstraintOperators.cs">
- <Link>Constraints\ConstraintOperators.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ContainsConstraint.cs">
- <Link>Constraints\ContainsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EmptyConstraint.cs">
- <Link>Constraints\EmptyConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EmptyDirectoryConstraint.cs">
- <Link>Constraints\EmptyDirectoryConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EqualConstraint.cs">
- <Link>Constraints\EqualConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\EqualityAdapter.cs">
- <Link>Constraints\EqualityAdapter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\FloatingPointNumerics.cs">
- <Link>Constraints\FloatingPointNumerics.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\IResolveConstraint.cs">
- <Link>Constraints\IResolveConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\MessageWriter.cs">
- <Link>Constraints\MessageWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\MsgUtils.cs">
- <Link>Constraints\MsgUtils.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Numerics.cs">
- <Link>Constraints\Numerics.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\NUnitComparer.cs">
- <Link>Constraints\NUnitComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\NUnitEqualityComparer.cs">
- <Link>Constraints\NUnitEqualityComparer.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PathConstraints.cs">
- <Link>Constraints\PathConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PrefixConstraints.cs">
- <Link>Constraints\PrefixConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\PropertyConstraint.cs">
- <Link>Constraints\PropertyConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\RangeConstraint.cs">
- <Link>Constraints\RangeConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ResolvableConstraintExpression.cs">
- <Link>Constraints\ResolvableConstraintExpression.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ReusableConstraint.cs">
- <Link>Constraints\ReusableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\SameAsConstraint.cs">
- <Link>Constraints\SameAsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\StringConstraints.cs">
- <Link>Constraints\StringConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\ThrowsConstraint.cs">
- <Link>Constraints\ThrowsConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\Tolerance.cs">
- <Link>Constraints\Tolerance.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\TypeConstraints.cs">
- <Link>Constraints\TypeConstraints.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Constraints\XmlSerializableConstraint.cs">
- <Link>Constraints\XmlSerializableConstraint.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Contains.cs">
- <Link>Contains.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Env.cs">
- <Link>Env.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\AssertionException.cs">
- <Link>Exceptions\AssertionException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\IgnoreException.cs">
- <Link>Exceptions\IgnoreException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\InconclusiveException.cs">
- <Link>Exceptions\InconclusiveException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Exceptions\SuccessException.cs">
- <Link>Exceptions\SuccessException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\GlobalSettings.cs">
- <Link>GlobalSettings.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Has.cs">
- <Link>Has.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\IExpectException.cs">
- <Link>IExpectException.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\AssemblyHelper.cs">
- <Link>Internal\AssemblyHelper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitLiteTestCaseBuilder.cs">
- <Link>Internal\Builders\NUnitLiteTestCaseBuilder.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitLiteTestFixtureBuilder.cs">
- <Link>Internal\Builders\NUnitLiteTestFixtureBuilder.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\CommandBuilder.cs">
- <Link>Internal\Commands\CommandBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\DelegatingTestCommand.cs">
- <Link>Internal\Commands\DelegatingTestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\ExpectedExceptionCommand.cs">
- <Link>Internal\Commands\ExpectedExceptionCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\ITestCommand.cs">
- <Link>Internal\Commands\ITestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\MaxTimeCommand.cs">
- <Link>Internal\Commands\MaxTimeCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\RepeatedTestCommand.cs">
- <Link>Internal\Commands\RepeatedTestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\SetUpTearDownCommand.cs">
- <Link>Internal\Commands\SetUpTearDownCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\SkipCommand.cs">
- <Link>Internal\Commands\SkipCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestCaseCommand.cs">
- <Link>Internal\Commands\TestCaseCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestCommand.cs">
- <Link>Internal\Commands\TestCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestExecutionContextCommand.cs">
- <Link>Internal\Commands\TestExecutionContextCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestGroupCommand.cs">
- <Link>Internal\Commands\TestGroupCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestMethodCommand.cs">
- <Link>Internal\Commands\TestMethodCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Commands\TestSuiteCommand.cs">
- <Link>Internal\Commands\TestSuiteCommand.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\DirectorySwapper.cs">
- <Link>Internal\DirectorySwapper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ExceptionHelper.cs">
- <Link>Internal\ExceptionHelper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ExpectedExceptionProcessor.cs">
- <Link>Internal\ExpectedExceptionProcessor.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\InvalidTestFixtureException.cs">
- <Link>Internal\InvalidTestFixtureException.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Log4NetCapture.cs">
- <Link>Internal\Log4NetCapture.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\LogCapture.cs">
- <Link>Internal\LogCapture.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\MethodHelper.cs">
- <Link>Internal\MethodHelper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\NUnitException.cs">
- <Link>Internal\NUnitException.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\ParameterSet.cs">
- <Link>Internal\ParameterSet.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\PropertyBag.cs">
- <Link>Internal\PropertyBag.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Reflect.cs">
- <Link>Internal\Reflect.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestExecutionContext.cs">
- <Link>Internal\TestExecutionContext.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestListener.cs">
- <Link>Internal\TestListener.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TestResult.cs">
- <Link>Internal\TestResult.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedFixtureSuite.cs">
- <Link>Internal\Tests\ParameterizedFixtureSuite.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedMethodSuite.cs">
- <Link>Internal\Tests\ParameterizedMethodSuite.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\SetUpFixture.cs">
- <Link>Internal\Tests\SetUpFixture.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\Test.cs">
- <Link>Internal\Tests\Test.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestAssembly.cs">
- <Link>Internal\Tests\TestAssembly.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestFixture.cs">
- <Link>Internal\Tests\TestFixture.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestMethod.cs">
- <Link>Internal\Tests\TestMethod.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\Tests\TestSuite.cs">
- <Link>Internal\Tests\TestSuite.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TextCapture.cs">
- <Link>Internal\TextCapture.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TextMessageWriter.cs">
- <Link>Internal\TextMessageWriter.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\TypeHelper.cs">
- <Link>Internal\TypeHelper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Internal\XmlHelper.cs">
- <Link>Internal\XmlHelper.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\..\src\framework\Is.cs">
- <Link>Is.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\ListMapper.cs">
- <Link>ListMapper.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\MessageMatch.cs">
- <Link>MessageMatch.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\ObjectList.cs">
- <Link>ObjectList.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\CommandLineOptions.cs">
- <Link>Runner\CommandLineOptions.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\ConsoleWriter.cs">
- <Link>Runner\ConsoleWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\DebugWriter.cs">
- <Link>Runner\DebugWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\ResultSummary.cs">
- <Link>Runner\ResultSummary.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\TcpWriter.cs">
- <Link>Runner\TcpWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\TestLoader.cs">
- <Link>Runner\TestLoader.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\TestRunner.cs">
- <Link>Runner\TestRunner.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Runner\TextUI.cs">
- <Link>Runner\TextUI.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\SpecialValue.cs">
- <Link>SpecialValue.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\TestCaseData.cs">
- <Link>TestCaseData.cs</Link>
- </Compile>
- <Compile Include="..\..\..\src\framework\Throws.cs">
- <Link>Throws.cs</Link>
- </Compile>
- <None Include="..\..\..\src\framework\Templates\Contains.template.cs">
- <Link>Templates\Contains.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Assert.template.cs">
- <Link>Templates\Assert.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\ConstraintExpression.template.cs">
- <Link>Templates\ConstraintExpression.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\ConstraintFactory.template.cs">
- <Link>Templates\ConstraintFactory.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Has.template.cs">
- <Link>Templates\Has.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Is.template.cs">
- <Link>Templates\Is.template.cs</Link>
- </None>
- <None Include="..\..\..\src\framework\Templates\Throws.template.cs">
- <Link>Templates\Throws.template.cs</Link>
- </None>
- <None Include="nunit.snk" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="..\..\..\src\framework\SyntaxElements.txt">
- <Link>SyntaxElements.txt</Link>
- </Content>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{756BF807-B7A1-4BC0-B6AE-61FE0AF30C5B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\bin\Debug\nunitlite.XML</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NUNITLITE;CLR_4_0;NET_4_0;CS_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\bin\Release\nunitlite.XML</DocumentationFile>
+ </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.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\src\CommonAssemblyInfo.cs">
+ <Link>CommonAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IApplyToTest.cs">
+ <Link>Api\IApplyToTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IPropertyBag.cs">
+ <Link>Api\IPropertyBag.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITest.cs">
+ <Link>Api\ITest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestCaseData.cs">
+ <Link>Api\ITestCaseData.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestCaseSource.cs">
+ <Link>Api\ITestCaseSource.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestListener.cs">
+ <Link>Api\ITestListener.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ITestResult.cs">
+ <Link>Api\ITestResult.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\IXmlNodeBuilder.cs">
+ <Link>Api\IXmlNodeBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\PropertyEntry.cs">
+ <Link>Api\PropertyEntry.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\PropertyNames.cs">
+ <Link>Api\PropertyNames.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\ResultState.cs">
+ <Link>Api\ResultState.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\RunState.cs">
+ <Link>Api\RunState.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\TestOutput.cs">
+ <Link>Api\TestOutput.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Api\TestStatus.cs">
+ <Link>Api\TestStatus.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Assert.cs">
+ <Link>Assert.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\AssertionHelper.cs">
+ <Link>AssertionHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\CategoryAttribute.cs">
+ <Link>Attributes\CategoryAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DataAttribute.cs">
+ <Link>Attributes\DataAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\DescriptionAttribute.cs">
+ <Link>Attributes\DescriptionAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\ExpectedExceptionAttribute.cs">
+ <Link>Attributes\ExpectedExceptionAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\IgnoreAttribute.cs">
+ <Link>Attributes\IgnoreAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\NUnitAttribute.cs">
+ <Link>Attributes\NUnitAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\PropertyAttribute.cs">
+ <Link>Attributes\PropertyAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\SetUpAttribute.cs">
+ <Link>Attributes\SetUpAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TearDownAttribute.cs">
+ <Link>Attributes\TearDownAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestAttribute.cs">
+ <Link>Attributes\TestAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestCaseAttribute.cs">
+ <Link>Attributes\TestCaseAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestCaseSourceAttribute.cs">
+ <Link>Attributes\TestCaseSourceAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestFixtureAttribute.cs">
+ <Link>Attributes\TestFixtureAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Attributes\TestModificationAttribute.cs">
+ <Link>Attributes\TestModificationAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\CompatibleCollections.cs">
+ <Link>CompatibleCollections.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AllItemsConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\AllItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AndConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\AndConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AndOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\AndOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AssignableFromConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\AssignableFromConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AssignableToConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\AssignableToConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeConstraint.cs">
+ <Link>Constraints\OF-AttributeConstraint\AttributeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeExistsConstraint.cs">
+ <Link>Constraints\OF-AttributeConstraint\AttributeExistsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\AttributeOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\AttributeOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BasicConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\BasicConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinaryConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\BinaryConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinaryOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\BinaryOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\BinarySerializableConstraint.cs">
+ <Link>Constraints\BinarySerializableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionContainsConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionContainsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionEquivalentConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionEquivalentConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionItemsEqualConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionItemsEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\CollectionOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionOrderedConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionOrderedConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionSubsetConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\CollectionSubsetConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\CollectionTally.cs">
+ <Link>Constraints\CollectionTally.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ComparisonAdapter.cs">
+ <Link>Constraints\ComparisonAdapter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ComparisonConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\ComparisonConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Constraint.cs">
+ <Link>Constraints\Constraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintBuilder.cs">
+ <Link>Constraints\ConstraintBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpression.cs">
+ <Link>Constraints\ConstraintExpression.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintExpressionBase.cs">
+ <Link>Constraints\ConstraintExpressionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintFactory.cs">
+ <Link>Constraints\ConstraintFactory.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ConstraintOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\ConstraintOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ContainsConstraint.cs">
+ <Link>Constraints\ContainsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyCollectionConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\EmptyCollectionConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyConstraint.cs">
+ <Link>Constraints\EmptyConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyDirectoryConstraint.cs">
+ <Link>Constraints\EmptyDirectoryConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EmptyStringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\EmptyStringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EndsWithConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\EndsWithConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EqualConstraint.cs">
+ <Link>Constraints\EqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\EqualityAdapter.cs">
+ <Link>Constraints\EqualityAdapter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ExactTypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\ExactTypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\FalseConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\FalseConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\FloatingPointNumerics.cs">
+ <Link>Constraints\FloatingPointNumerics.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\GreaterThanConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\GreaterThanConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\GreaterThanOrEqualConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\GreaterThanOrEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\InstanceOfTypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\InstanceOfTypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\IResolveConstraint.cs">
+ <Link>Constraints\IResolveConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\LessThanConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\LessThanConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\LessThanOrEqualConstraint.cs">
+ <Link>Constraints\OF-ComparisonConstraints\LessThanOrEqualConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\MessageWriter.cs">
+ <Link>Constraints\MessageWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\MsgUtils.cs">
+ <Link>Constraints\MsgUtils.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NaNConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\NaNConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NoItemConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\NoItemConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NotConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\NotConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NotOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\NotOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NullConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\NullConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NullOrEmptyStringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\NullOrEmptyStringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Numerics.cs">
+ <Link>Constraints\Numerics.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NUnitComparer.cs">
+ <Link>Constraints\NUnitComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\NUnitEqualityComparer.cs">
+ <Link>Constraints\NUnitEqualityComparer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\OrConstraint.cs">
+ <Link>Constraints\OF-BinaryOperations\OrConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\OrOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\OrOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PathConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\PathConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PrefixConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\PrefixConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PrefixOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\PrefixOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropertyConstraint.cs">
+ <Link>Constraints\PropertyConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropertyExistsConstraint.cs">
+ <Link>Constraints\PropertyExistsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\PropOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\PropOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\RangeConstraint.cs">
+ <Link>Constraints\RangeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\RegexConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\RegexConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ResolvableConstraintExpression.cs">
+ <Link>Constraints\ResolvableConstraintExpression.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ReusableConstraint.cs">
+ <Link>Constraints\ReusableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SameAsConstraint.cs">
+ <Link>Constraints\SameAsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SamePathConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\SamePathConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SamePathOrUnderConstraint.cs">
+ <Link>Constraints\OF-PathConstraints\SamePathOrUnderConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SelfResolvingOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\SelfResolvingOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SomeItemsConstraint.cs">
+ <Link>Constraints\OF-PrefixConstraints\SomeItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\StartsWithConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\StartsWithConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\StringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\StringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\SubstringConstraint.cs">
+ <Link>Constraints\OF-StringConstraints\SubstringConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsConstraint.cs">
+ <Link>Constraints\ThrowsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsNothingConstraint.cs">
+ <Link>Constraints\ThrowsNothingConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ThrowsOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\ThrowsOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\Tolerance.cs">
+ <Link>Constraints\Tolerance.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\ToleranceMode.cs">
+ <Link>Constraints\ToleranceMode.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\TrueConstraint.cs">
+ <Link>Constraints\OF-BasicConstraints\TrueConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\TypeConstraint.cs">
+ <Link>Constraints\OF-TypeConstraints\TypeConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\UniqueItemsConstraint.cs">
+ <Link>Constraints\OF-CollectionConstraints\UniqueItemsConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\WithOperator.cs">
+ <Link>Constraints\OF-ConstraintOperators\WithOperator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Constraints\XmlSerializableConstraint.cs">
+ <Link>Constraints\XmlSerializableConstraint.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Contains.cs">
+ <Link>Contains.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Env.cs">
+ <Link>Env.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\AssertionException.cs">
+ <Link>Exceptions\AssertionException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\IgnoreException.cs">
+ <Link>Exceptions\IgnoreException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\InconclusiveException.cs">
+ <Link>Exceptions\InconclusiveException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Exceptions\SuccessException.cs">
+ <Link>Exceptions\SuccessException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\GlobalSettings.cs">
+ <Link>GlobalSettings.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Has.cs">
+ <Link>Has.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\IExpectException.cs">
+ <Link>IExpectException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\AssemblyHelper.cs">
+ <Link>Internal\AssemblyHelper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitLiteTestCaseBuilder.cs">
+ <Link>Internal\Builders\NUnitLiteTestCaseBuilder.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Builders\NUnitLiteTestFixtureBuilder.cs">
+ <Link>Internal\Builders\NUnitLiteTestFixtureBuilder.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\CommandBuilder.cs">
+ <Link>Internal\Commands\CommandBuilder.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\DelegatingTestCommand.cs">
+ <Link>Internal\Commands\DelegatingTestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\ExpectedExceptionCommand.cs">
+ <Link>Internal\Commands\ExpectedExceptionCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\ITestCommand.cs">
+ <Link>Internal\Commands\ITestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\MaxTimeCommand.cs">
+ <Link>Internal\Commands\MaxTimeCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\RepeatedTestCommand.cs">
+ <Link>Internal\Commands\RepeatedTestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\SetUpTearDownCommand.cs">
+ <Link>Internal\Commands\SetUpTearDownCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\SkipCommand.cs">
+ <Link>Internal\Commands\SkipCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestCaseCommand.cs">
+ <Link>Internal\Commands\TestCaseCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestCommand.cs">
+ <Link>Internal\Commands\TestCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestExecutionContextCommand.cs">
+ <Link>Internal\Commands\TestExecutionContextCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestGroupCommand.cs">
+ <Link>Internal\Commands\TestGroupCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestMethodCommand.cs">
+ <Link>Internal\Commands\TestMethodCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Commands\TestSuiteCommand.cs">
+ <Link>Internal\Commands\TestSuiteCommand.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\DirectorySwapper.cs">
+ <Link>Internal\DirectorySwapper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ExceptionHelper.cs">
+ <Link>Internal\ExceptionHelper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ExpectedExceptionProcessor.cs">
+ <Link>Internal\ExpectedExceptionProcessor.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\InvalidTestFixtureException.cs">
+ <Link>Internal\InvalidTestFixtureException.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Log4NetCapture.cs">
+ <Link>Internal\Log4NetCapture.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\LogCapture.cs">
+ <Link>Internal\LogCapture.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\MethodHelper.cs">
+ <Link>Internal\MethodHelper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\NUnitException.cs">
+ <Link>Internal\NUnitException.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\ParameterSet.cs">
+ <Link>Internal\ParameterSet.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\PropertyBag.cs">
+ <Link>Internal\PropertyBag.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Reflect.cs">
+ <Link>Internal\Reflect.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestExecutionContext.cs">
+ <Link>Internal\TestExecutionContext.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestListener.cs">
+ <Link>Internal\TestListener.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TestResult.cs">
+ <Link>Internal\TestResult.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedFixtureSuite.cs">
+ <Link>Internal\Tests\ParameterizedFixtureSuite.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\ParameterizedMethodSuite.cs">
+ <Link>Internal\Tests\ParameterizedMethodSuite.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\SetUpFixture.cs">
+ <Link>Internal\Tests\SetUpFixture.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\Test.cs">
+ <Link>Internal\Tests\Test.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestAssembly.cs">
+ <Link>Internal\Tests\TestAssembly.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestFixture.cs">
+ <Link>Internal\Tests\TestFixture.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestMethod.cs">
+ <Link>Internal\Tests\TestMethod.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\Tests\TestSuite.cs">
+ <Link>Internal\Tests\TestSuite.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TextCapture.cs">
+ <Link>Internal\TextCapture.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TextMessageWriter.cs">
+ <Link>Internal\TextMessageWriter.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\TypeHelper.cs">
+ <Link>Internal\TypeHelper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Internal\XmlHelper.cs">
+ <Link>Internal\XmlHelper.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Is.cs">
+ <Link>Is.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\ListMapper.cs">
+ <Link>ListMapper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\MessageMatch.cs">
+ <Link>MessageMatch.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\ObjectList.cs">
+ <Link>ObjectList.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\CommandLineOptions.cs">
+ <Link>Runner\CommandLineOptions.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\ConsoleWriter.cs">
+ <Link>Runner\ConsoleWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\DebugWriter.cs">
+ <Link>Runner\DebugWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\ResultSummary.cs">
+ <Link>Runner\ResultSummary.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\TcpWriter.cs">
+ <Link>Runner\TcpWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\TestLoader.cs">
+ <Link>Runner\TestLoader.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\TestRunner.cs">
+ <Link>Runner\TestRunner.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Runner\TextUI.cs">
+ <Link>Runner\TextUI.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\SpecialValue.cs">
+ <Link>SpecialValue.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\TestCaseData.cs">
+ <Link>TestCaseData.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\src\framework\Throws.cs">
+ <Link>Throws.cs</Link>
+ </Compile>
+ <None Include="..\..\..\src\framework\Templates\Contains.template.cs">
+ <Link>Templates\Contains.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Assert.template.cs">
+ <Link>Templates\Assert.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\ConstraintExpression.template.cs">
+ <Link>Templates\ConstraintExpression.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\ConstraintFactory.template.cs">
+ <Link>Templates\ConstraintFactory.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Has.template.cs">
+ <Link>Templates\Has.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Is.template.cs">
+ <Link>Templates\Is.template.cs</Link>
+ </None>
+ <None Include="..\..\..\src\framework\Templates\Throws.template.cs">
+ <Link>Templates\Throws.template.cs</Link>
+ </None>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="..\..\..\src\framework\SyntaxElements.txt">
+ <Link>SyntaxElements.txt</Link>
+ </Content>
+ </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>
\ No newline at end of file
=== added file 'src/framework/Constraints/AllItemsConstraint.cs'
--- src/framework/Constraints/AllItemsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AllItemsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AllItemsConstraint applies another constraint to each
+ /// item in a collection, succeeding if they all succeed.
+ /// </summary>
+ public class AllItemsConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct an AllItemsConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public AllItemsConstraint(Constraint itemConstraint)
+ : base( itemConstraint )
+ {
+ this.DisplayName = "all";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// failing if any item fails.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is IEnumerable) )
+ throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
+
+ foreach(object item in (IEnumerable)actual)
+ if (!baseConstraint.Matches(item))
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("all items");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/AndConstraint.cs'
--- src/framework/Constraints/AndConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AndConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,100 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AndConstraint succeeds only if both members succeed.
+ /// </summary>
+ public class AndConstraint : BinaryConstraint
+ {
+ private enum FailurePoint
+ {
+ None,
+ Left,
+ Right
+ };
+
+ private FailurePoint failurePoint;
+
+ /// <summary>
+ /// Create an AndConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ public AndConstraint(Constraint left, Constraint right) : base(left, right) { }
+
+ /// <summary>
+ /// Apply both member constraints to an actual value, succeeding
+ /// succeeding only if both of them succeed.
+ /// </summary>
+ /// <param name="actual">The actual value</param>
+ /// <returns>True if the constraints both succeeded</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ failurePoint = Left.Matches(actual)
+ ? Right.Matches(actual)
+ ? FailurePoint.None
+ : FailurePoint.Right
+ : FailurePoint.Left;
+
+ return failurePoint == FailurePoint.None;
+ }
+
+ /// <summary>
+ /// Write a description for this contraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to receive the description</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ Left.WriteDescriptionTo(writer);
+ writer.WriteConnector("and");
+ Right.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ switch (failurePoint)
+ {
+ case FailurePoint.Left:
+ Left.WriteActualValueTo(writer);
+ break;
+ case FailurePoint.Right:
+ Right.WriteActualValueTo(writer);
+ break;
+ default:
+ base.WriteActualValueTo(writer);
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/AndOperator.cs'
--- src/framework/Constraints/AndOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AndOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that requires both it's arguments to succeed
+ /// </summary>
+ public class AndOperator : BinaryOperator
+ {
+ /// <summary>
+ /// Construct an AndOperator
+ /// </summary>
+ public AndOperator()
+ {
+ this.left_precedence = this.right_precedence = 2;
+ }
+
+ /// <summary>
+ /// Apply the operator to produce an AndConstraint
+ /// </summary>
+ public override Constraint ApplyOperator(Constraint left, Constraint right)
+ {
+ return new AndConstraint(left, right);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/AssignableFromConstraint.cs'
--- src/framework/Constraints/AssignableFromConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AssignableFromConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AssignableFromConstraint is used to test that an object
+ /// can be assigned from a given Type.
+ /// </summary>
+ public class AssignableFromConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an AssignableFromConstraint for the type provided
+ /// </summary>
+ /// <param name="type"></param>
+ public AssignableFromConstraint(Type type) : base(type) { }
+
+ /// <summary>
+ /// Test whether an object can be assigned from the specified type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && actual.GetType().IsAssignableFrom(expectedType);
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("assignable from");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
=== added file 'src/framework/Constraints/AssignableToConstraint.cs'
--- src/framework/Constraints/AssignableToConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AssignableToConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AssignableToConstraint is used to test that an object
+ /// can be assigned to a given Type.
+ /// </summary>
+ public class AssignableToConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an AssignableToConstraint for the type provided
+ /// </summary>
+ /// <param name="type"></param>
+ public AssignableToConstraint(Type type) : base(type) { }
+
+ /// <summary>
+ /// Test whether an object can be assigned to the specified type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && expectedType.IsAssignableFrom(actual.GetType());
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("assignable to");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/AttributeConstraint.cs'
--- src/framework/Constraints/AttributeConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AttributeConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,106 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AttributeConstraint tests that a specified attribute is present
+ /// on a Type or other provider and that the value of the attribute
+ /// satisfies some other constraint.
+ /// </summary>
+ public class AttributeConstraint : PrefixConstraint
+ {
+ private readonly Type expectedType;
+ private Attribute attrFound;
+
+ /// <summary>
+ /// Constructs an AttributeConstraint for a specified attriute
+ /// Type and base constraint.
+ /// </summary>
+ /// <param name="type"></param>
+ /// <param name="baseConstraint"></param>
+ public AttributeConstraint(Type type, Constraint baseConstraint)
+ : base(baseConstraint)
+ {
+ this.expectedType = type;
+
+ if (!typeof(Attribute).IsAssignableFrom(expectedType))
+ throw new ArgumentException(string.Format(
+ "Type {0} is not an attribute", expectedType), "type");
+ }
+
+ /// <summary>
+ /// Determines whether the Type or other provider has the
+ /// expected attribute and if its value matches the
+ /// additional constraint specified.
+ /// </summary>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ System.Reflection.ICustomAttributeProvider attrProvider =
+ actual as System.Reflection.ICustomAttributeProvider;
+
+ if (attrProvider == null)
+ throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
+
+ Attribute[] attrs = (Attribute[])attrProvider.GetCustomAttributes(expectedType, true);
+ if (attrs.Length == 0)
+ throw new ArgumentException(string.Format("Attribute {0} was not found", expectedType), "actual");
+
+ this.attrFound = attrs[0];
+ return baseConstraint.Matches(attrFound);
+ }
+
+ /// <summary>
+ /// Writes a description of the attribute to the specified writer.
+ /// </summary>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("attribute " + expectedType.FullName);
+ if (baseConstraint != null)
+ {
+ if (baseConstraint is EqualConstraint)
+ writer.WritePredicate("equal to");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+
+ /// <summary>
+ /// Writes the actual value supplied to the specified writer.
+ /// </summary>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(attrFound);
+ }
+
+ /// <summary>
+ /// Returns a string representation of the constraint.
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<attribute {0} {1}>", expectedType, baseConstraint);
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/AttributeConstraints.cs'
--- src/framework/Constraints/AttributeConstraints.cs 2010-07-26 18:53:17 +0000
+++ src/framework/Constraints/AttributeConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,155 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2008 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// AttributeExistsConstraint tests for the presence of a
- /// specified attribute on a Type.
- /// </summary>
- public class AttributeExistsConstraint : Constraint
- {
- private Type expectedType;
-
- /// <summary>
- /// Constructs an AttributeExistsConstraint for a specific attribute Type
- /// </summary>
- /// <param name="type"></param>
- public AttributeExistsConstraint(Type type)
- : base(type)
- {
- this.expectedType = type;
-
- if (!typeof(Attribute).IsAssignableFrom(expectedType))
- throw new ArgumentException(string.Format(
- "Type {0} is not an attribute", expectedType), "type");
- }
-
- /// <summary>
- /// Tests whether the object provides the expected attribute.
- /// </summary>
- /// <param name="actual">A Type, MethodInfo, or other ICustomAttributeProvider</param>
- /// <returns>True if the expected attribute is present, otherwise false</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- System.Reflection.ICustomAttributeProvider attrProvider =
- actual as System.Reflection.ICustomAttributeProvider;
-
- if (attrProvider == null)
- throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
-
- return attrProvider.GetCustomAttributes(expectedType, true).Length > 0;
- }
-
- /// <summary>
- /// Writes the description of the constraint to the specified writer
- /// </summary>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("type with attribute");
- writer.WriteExpectedValue(expectedType);
- }
- }
-
- /// <summary>
- /// AttributeConstraint tests that a specified attribute is present
- /// on a Type or other provider and that the value of the attribute
- /// satisfies some other constraint.
- /// </summary>
- public class AttributeConstraint : PrefixConstraint
- {
- private Type expectedType;
- private Attribute attrFound;
-
- /// <summary>
- /// Constructs an AttributeConstraint for a specified attriute
- /// Type and base constraint.
- /// </summary>
- /// <param name="type"></param>
- /// <param name="baseConstraint"></param>
- public AttributeConstraint(Type type, Constraint baseConstraint)
- : base( baseConstraint )
- {
- this.expectedType = type;
-
- if (!typeof(Attribute).IsAssignableFrom(expectedType))
- throw new ArgumentException(string.Format(
- "Type {0} is not an attribute", expectedType), "type");
- }
-
- /// <summary>
- /// Determines whether the Type or other provider has the
- /// expected attribute and if its value matches the
- /// additional constraint specified.
- /// </summary>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- System.Reflection.ICustomAttributeProvider attrProvider =
- actual as System.Reflection.ICustomAttributeProvider;
-
- if (attrProvider == null)
- throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
-
- Attribute[] attrs = (Attribute[])attrProvider.GetCustomAttributes(expectedType, true);
- if (attrs.Length == 0)
- throw new ArgumentException(string.Format("Attribute {0} was not found", expectedType), "actual");
-
- this.attrFound = attrs[0];
- return baseConstraint.Matches(attrFound);
- }
-
- /// <summary>
- /// Writes a description of the attribute to the specified writer.
- /// </summary>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("attribute " + expectedType.FullName);
- if (baseConstraint != null)
- {
- if (baseConstraint is EqualConstraint)
- writer.WritePredicate("equal to");
- baseConstraint.WriteDescriptionTo(writer);
- }
- }
-
- /// <summary>
- /// Writes the actual value supplied to the specified writer.
- /// </summary>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- writer.WriteActualValue(attrFound);
- }
-
- /// <summary>
- /// Returns a string representation of the constraint.
- /// </summary>
- protected override string GetStringRepresentation()
- {
- return string.Format("<attribute {0} {1}>", expectedType, baseConstraint);
- }
- }
-}
=== added file 'src/framework/Constraints/AttributeExistsConstraint.cs'
--- src/framework/Constraints/AttributeExistsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AttributeExistsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AttributeExistsConstraint tests for the presence of a
+ /// specified attribute on a Type.
+ /// </summary>
+ public class AttributeExistsConstraint : Constraint
+ {
+ private Type expectedType;
+
+ /// <summary>
+ /// Constructs an AttributeExistsConstraint for a specific attribute Type
+ /// </summary>
+ /// <param name="type"></param>
+ public AttributeExistsConstraint(Type type)
+ : base(type)
+ {
+ this.expectedType = type;
+
+ if (!typeof(Attribute).IsAssignableFrom(expectedType))
+ throw new ArgumentException(string.Format(
+ "Type {0} is not an attribute", expectedType), "type");
+ }
+
+ /// <summary>
+ /// Tests whether the object provides the expected attribute.
+ /// </summary>
+ /// <param name="actual">A Type, MethodInfo, or other ICustomAttributeProvider</param>
+ /// <returns>True if the expected attribute is present, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ System.Reflection.ICustomAttributeProvider attrProvider =
+ actual as System.Reflection.ICustomAttributeProvider;
+
+ if (attrProvider == null)
+ throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
+
+ return attrProvider.GetCustomAttributes(expectedType, true).Length > 0;
+ }
+
+ /// <summary>
+ /// Writes the description of the constraint to the specified writer
+ /// </summary>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("type with attribute");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/AttributeOperator.cs'
--- src/framework/Constraints/AttributeOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/AttributeOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that tests for the presence of a particular attribute
+ /// on a type and optionally applies further tests to the attribute.
+ /// </summary>
+ public class AttributeOperator : SelfResolvingOperator
+ {
+ private readonly Type type;
+
+ /// <summary>
+ /// Construct an AttributeOperator for a particular Type
+ /// </summary>
+ /// <param name="type">The Type of attribute tested</param>
+ public AttributeOperator(Type type)
+ {
+ this.type = type;
+
+ // Attribute stacks on anything and allows only
+ // prefix operators to stack on it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new AttributeExistsConstraint(type));
+ else
+ stack.Push(new AttributeConstraint(type, stack.Pop()));
+ }
+ }
+ }
\ No newline at end of file
=== added file 'src/framework/Constraints/BasicConstraint.cs'
--- src/framework/Constraints/BasicConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/BasicConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// BasicConstraint is the abstract base for constraints that
+ /// perform a simple comparison to a constant value.
+ /// </summary>
+ public abstract class BasicConstraint : Constraint
+ {
+ private readonly object expected;
+ private readonly string description;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:BasicConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected.</param>
+ /// <param name="description">The description.</param>
+ protected BasicConstraint(object expected, string description)
+ {
+ this.expected = expected;
+ this.description = description;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null && expected == null)
+ return true;
+
+ if (actual == null || expected == null)
+ return false;
+
+ return expected.Equals(actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write(description);
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/BasicConstraints.cs'
--- src/framework/Constraints/BasicConstraints.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/BasicConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,136 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2008 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// BasicConstraint is the abstract base for constraints that
- /// perform a simple comparison to a constant value.
- /// </summary>
- public abstract class BasicConstraint : Constraint
- {
- private object expected;
- private string description;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:BasicConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected.</param>
- /// <param name="description">The description.</param>
- public BasicConstraint(object expected, string description)
- {
- this.expected = expected;
- this.description = description;
- }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (actual == null && expected == null)
- return true;
-
- if (actual == null || expected == null)
- return false;
-
- return expected.Equals(actual);
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write(description);
- }
- }
-
- /// <summary>
- /// NullConstraint tests that the actual value is null
- /// </summary>
- public class NullConstraint : BasicConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:NullConstraint"/> class.
- /// </summary>
- public NullConstraint() : base(null, "null") { }
- }
-
- /// <summary>
- /// TrueConstraint tests that the actual value is true
- /// </summary>
- public class TrueConstraint : BasicConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:TrueConstraint"/> class.
- /// </summary>
- public TrueConstraint() : base(true, "True") { }
- }
-
- /// <summary>
- /// FalseConstraint tests that the actual value is false
- /// </summary>
- public class FalseConstraint : BasicConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:FalseConstraint"/> class.
- /// </summary>
- public FalseConstraint() : base(false, "False") { }
- }
-
- /// <summary>
- /// NaNConstraint tests that the actual value is a double or float NaN
- /// </summary>
- public class NaNConstraint : Constraint
- {
- /// <summary>
- /// Test that the actual value is an NaN
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- return actual is double && double.IsNaN((double)actual)
- || actual is float && float.IsNaN((float)actual);
- }
-
- /// <summary>
- /// Write the constraint description to a specified writer
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write("NaN");
- }
- }
-}
=== added file 'src/framework/Constraints/BinaryConstraint.cs'
--- src/framework/Constraints/BinaryConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/BinaryConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// BinaryConstraint is the abstract base of all constraints
+ /// that combine two other constraints in some fashion.
+ /// </summary>
+ public abstract class BinaryConstraint : Constraint
+ {
+ /// <summary>
+ /// The first constraint being combined
+ /// </summary>
+ protected Constraint Left;
+ /// <summary>
+ /// The second constraint being combined
+ /// </summary>
+ protected Constraint Right;
+
+ /// <summary>
+ /// Construct a BinaryConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ protected BinaryConstraint(Constraint left, Constraint right) : base(left, right)
+ {
+ this.Left = left;
+ this.Right = right;
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/BinaryOperations.cs'
--- src/framework/Constraints/BinaryOperations.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/BinaryOperations.cs 1970-01-01 00:00:00 +0000
@@ -1,165 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// BinaryConstraint is the abstract base of all constraints
- /// that combine two other constraints in some fashion.
- /// </summary>
- public abstract class BinaryConstraint : Constraint
- {
- /// <summary>
- /// The first constraint being combined
- /// </summary>
- protected Constraint left;
- /// <summary>
- /// The second constraint being combined
- /// </summary>
- protected Constraint right;
-
- /// <summary>
- /// Construct a BinaryConstraint from two other constraints
- /// </summary>
- /// <param name="left">The first constraint</param>
- /// <param name="right">The second constraint</param>
- public BinaryConstraint(Constraint left, Constraint right) : base(left, right)
- {
- this.left = left;
- this.right = right;
- }
- }
-
- /// <summary>
- /// AndConstraint succeeds only if both members succeed.
- /// </summary>
- public class AndConstraint : BinaryConstraint
- {
- private enum FailurePoint
- {
- None,
- Left,
- Right
- };
-
- private FailurePoint failurePoint;
-
- /// <summary>
- /// Create an AndConstraint from two other constraints
- /// </summary>
- /// <param name="left">The first constraint</param>
- /// <param name="right">The second constraint</param>
- public AndConstraint(Constraint left, Constraint right) : base(left, right) { }
-
- /// <summary>
- /// Apply both member constraints to an actual value, succeeding
- /// succeeding only if both of them succeed.
- /// </summary>
- /// <param name="actual">The actual value</param>
- /// <returns>True if the constraints both succeeded</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- failurePoint = left.Matches(actual)
- ? right.Matches(actual)
- ? FailurePoint.None
- : FailurePoint.Right
- : FailurePoint.Left;
-
- return failurePoint == FailurePoint.None;
- }
-
- /// <summary>
- /// Write a description for this contraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to receive the description</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- left.WriteDescriptionTo(writer);
- writer.WriteConnector("and");
- right.WriteDescriptionTo(writer);
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a
- /// MessageWriter. The default implementation simply writes
- /// the raw value of actual, leaving it to the writer to
- /// perform any formatting.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- switch (failurePoint)
- {
- case FailurePoint.Left:
- left.WriteActualValueTo(writer);
- break;
- case FailurePoint.Right:
- right.WriteActualValueTo(writer);
- break;
- default:
- base.WriteActualValueTo(writer);
- break;
- }
- }
- }
-
- /// <summary>
- /// OrConstraint succeeds if either member succeeds
- /// </summary>
- public class OrConstraint : BinaryConstraint
- {
- /// <summary>
- /// Create an OrConstraint from two other constraints
- /// </summary>
- /// <param name="left">The first constraint</param>
- /// <param name="right">The second constraint</param>
- public OrConstraint(Constraint left, Constraint right) : base(left, right) { }
-
- /// <summary>
- /// Apply the member constraints to an actual value, succeeding
- /// succeeding as soon as one of them succeeds.
- /// </summary>
- /// <param name="actual">The actual value</param>
- /// <returns>True if either constraint succeeded</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return left.Matches(actual) || right.Matches(actual);
- }
-
- /// <summary>
- /// Write a description for this contraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to receive the description</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- left.WriteDescriptionTo(writer);
- writer.WriteConnector("or");
- right.WriteDescriptionTo(writer);
- }
- }
-}
=== added file 'src/framework/Constraints/BinaryOperator.cs'
--- src/framework/Constraints/BinaryOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/BinaryOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for all binary operators
+ /// </summary>
+ public abstract class BinaryOperator : ConstraintOperator
+ {
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ Constraint right = stack.Pop();
+ Constraint left = stack.Pop();
+ stack.Push(ApplyOperator(left, right));
+ }
+
+ /// <summary>
+ /// Gets the left precedence of the operator
+ /// </summary>
+ public override int LeftPrecedence
+ {
+ get
+ {
+ return RightContext is CollectionOperator
+ ? base.LeftPrecedence + 10
+ : base.LeftPrecedence;
+ }
+ }
+
+ /// <summary>
+ /// Gets the right precedence of the operator
+ /// </summary>
+ public override int RightPrecedence
+ {
+ get
+ {
+ return RightContext is CollectionOperator
+ ? base.RightPrecedence + 10
+ : base.RightPrecedence;
+ }
+ }
+
+ /// <summary>
+ /// Abstract method that produces a constraint by applying
+ /// the operator to its left and right constraint arguments.
+ /// </summary>
+ public abstract Constraint ApplyOperator(Constraint left, Constraint right);
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/BinarySerializableConstraint.cs'
--- src/framework/Constraints/BinarySerializableConstraint.cs 2010-07-26 18:53:17 +0000
+++ src/framework/Constraints/BinarySerializableConstraint.cs 2010-09-20 20:37:41 +0000
@@ -97,4 +97,4 @@
}
}
}
-#endif
+#endif
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionConstraint.cs'
--- src/framework/Constraints/CollectionConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,85 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionConstraint is the abstract base class for
+ /// constraints that operate on collections.
+ /// </summary>
+ public abstract class CollectionConstraint : Constraint
+ {
+ /// <summary>
+ /// Construct an empty CollectionConstraint
+ /// </summary>
+ protected CollectionConstraint() { }
+
+ /// <summary>
+ /// Construct a CollectionConstraint
+ /// </summary>
+ /// <param name="arg"></param>
+ protected CollectionConstraint(object arg) : base(arg) { }
+
+ /// <summary>
+ /// Determines whether the specified enumerable is empty.
+ /// </summary>
+ /// <param name="enumerable">The enumerable.</param>
+ /// <returns>
+ /// <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>.
+ /// </returns>
+ protected static bool IsEmpty( IEnumerable enumerable )
+ {
+ ICollection collection = enumerable as ICollection;
+ if ( collection != null )
+ return collection.Count == 0;
+ else
+ return !enumerable.GetEnumerator().MoveNext();
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ IEnumerable enumerable = actual as IEnumerable;
+ if ( enumerable == null )
+ throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
+
+ return doMatch( enumerable );
+ }
+
+ /// <summary>
+ /// Protected method to be implemented by derived classes
+ /// </summary>
+ /// <param name="collection"></param>
+ /// <returns></returns>
+ protected abstract bool doMatch(IEnumerable collection);
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/CollectionConstraints.cs'
--- src/framework/Constraints/CollectionConstraints.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/CollectionConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,558 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.Collections;
-using System.Reflection;
-using System.Text;
-#if CLR_2_0 || CLR_4_0
-using System.Collections.Generic;
-#endif
-
-namespace NUnit.Framework.Constraints
-{
- #region CollectionConstraint
- /// <summary>
- /// CollectionConstraint is the abstract base class for
- /// constraints that operate on collections.
- /// </summary>
- public abstract class CollectionConstraint : Constraint
- {
- /// <summary>
- /// Construct an empty CollectionConstraint
- /// </summary>
- public CollectionConstraint() { }
-
- /// <summary>
- /// Construct a CollectionConstraint
- /// </summary>
- /// <param name="arg"></param>
- public CollectionConstraint(object arg) : base(arg) { }
-
- /// <summary>
- /// Determines whether the specified enumerable is empty.
- /// </summary>
- /// <param name="enumerable">The enumerable.</param>
- /// <returns>
- /// <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>.
- /// </returns>
- protected static bool IsEmpty( IEnumerable enumerable )
- {
- ICollection collection = enumerable as ICollection;
- if ( collection != null )
- return collection.Count == 0;
- else
- return !enumerable.GetEnumerator().MoveNext();
- }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- IEnumerable enumerable = actual as IEnumerable;
- if ( enumerable == null )
- throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
-
- return doMatch( enumerable );
- }
-
- /// <summary>
- /// Protected method to be implemented by derived classes
- /// </summary>
- /// <param name="collection"></param>
- /// <returns></returns>
- protected abstract bool doMatch(IEnumerable collection);
- }
- #endregion
-
- #region CollectionItemsEqualConstraint
- /// <summary>
- /// CollectionItemsEqualConstraint is the abstract base class for all
- /// collection constraints that apply some notion of item equality
- /// as a part of their operation.
- /// </summary>
- public abstract class CollectionItemsEqualConstraint : CollectionConstraint
- {
- private NUnitEqualityComparer comparer = NUnitEqualityComparer.Default;
-
- /// <summary>
- /// Construct an empty CollectionConstraint
- /// </summary>
- public CollectionItemsEqualConstraint() { }
-
- /// <summary>
- /// Construct a CollectionConstraint
- /// </summary>
- /// <param name="arg"></param>
- public CollectionItemsEqualConstraint(object arg) : base(arg) { }
-
- #region Modifiers
- /// <summary>
- /// Flag the constraint to ignore case and return self.
- /// </summary>
- public CollectionItemsEqualConstraint IgnoreCase
- {
- get
- {
- comparer.IgnoreCase = true;
- return this;
- }
- }
-
- /// <summary>
- /// Flag the constraint to use the supplied IComparer object.
- /// </summary>
- /// <param name="comparer">The IComparer object to use.</param>
- /// <returns>Self.</returns>
- public CollectionItemsEqualConstraint Using(IComparer comparer)
- {
- this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
- return this;
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// Flag the constraint to use the supplied IComparer object.
- /// </summary>
- /// <param name="comparer">The IComparer object to use.</param>
- /// <returns>Self.</returns>
- public CollectionItemsEqualConstraint Using<T>(IComparer<T> comparer)
- {
- this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
- return this;
- }
-
- /// <summary>
- /// Flag the constraint to use the supplied Comparison object.
- /// </summary>
- /// <param name="comparer">The IComparer object to use.</param>
- /// <returns>Self.</returns>
- public CollectionItemsEqualConstraint Using<T>(Comparison<T> comparer)
- {
- this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
- return this;
- }
-
- /// <summary>
- /// Flag the constraint to use the supplied IEqualityComparer object.
- /// </summary>
- /// <param name="comparer">The IComparer object to use.</param>
- /// <returns>Self.</returns>
- public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
- {
- this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
- return this;
- }
-
- /// <summary>
- /// Flag the constraint to use the supplied IEqualityComparer object.
- /// </summary>
- /// <param name="comparer">The IComparer object to use.</param>
- /// <returns>Self.</returns>
- public CollectionItemsEqualConstraint Using<T>(IEqualityComparer<T> comparer)
- {
- this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
- return this;
- }
-#endif
- #endregion
-
- /// <summary>
- /// Compares two collection members for equality
- /// </summary>
- protected bool ItemsEqual(object x, object y)
- {
- return comparer.ObjectsEqual(x, y);
- }
-
- /// <summary>
- /// Return a new CollectionTally for use in making tests
- /// </summary>
- /// <param name="c">The collection to be included in the tally</param>
- protected CollectionTally Tally(IEnumerable c)
- {
- return new CollectionTally(comparer, c);
- }
- }
- #endregion
-
- #region EmptyCollectionConstraint
- /// <summary>
- /// EmptyCollectionConstraint tests whether a collection is empty.
- /// </summary>
- public class EmptyCollectionConstraint : CollectionConstraint
- {
- /// <summary>
- /// Check that the collection is empty
- /// </summary>
- /// <param name="collection"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable collection)
- {
- return IsEmpty( collection );
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write( "<empty>" );
- }
- }
- #endregion
-
- #region UniqueItemsConstraint
- /// <summary>
- /// UniqueItemsConstraint tests whether all the items in a
- /// collection are unique.
- /// </summary>
- public class UniqueItemsConstraint : CollectionItemsEqualConstraint
- {
- /// <summary>
- /// Check that all items are unique.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable actual)
- {
- ObjectList list = new ObjectList();
-
- foreach (object o1 in actual)
- {
- foreach( object o2 in list )
- if ( ItemsEqual(o1, o2) )
- return false;
- list.Add(o1);
- }
-
- return true;
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write("all items unique");
- }
- }
- #endregion
-
- #region CollectionContainsConstraint
- /// <summary>
- /// CollectionContainsConstraint is used to test whether a collection
- /// contains an expected object as a member.
- /// </summary>
- public class CollectionContainsConstraint : CollectionItemsEqualConstraint
- {
- private object expected;
-
- /// <summary>
- /// Construct a CollectionContainsConstraint
- /// </summary>
- /// <param name="expected"></param>
- public CollectionContainsConstraint(object expected)
- : base(expected)
- {
- this.expected = expected;
- this.DisplayName = "contains";
- }
-
- /// <summary>
- /// Test whether the expected item is contained in the collection
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable actual)
- {
- foreach (object obj in actual)
- if (ItemsEqual(obj, expected))
- return true;
-
- return false;
- }
-
- /// <summary>
- /// Write a descripton of the constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("collection containing");
- writer.WriteExpectedValue(expected);
- }
- }
- #endregion
-
- #region CollectionEquivalentConstraint
- /// <summary>
- /// CollectionEquivalentCOnstraint is used to determine whether two
- /// collections are equivalent.
- /// </summary>
- public class CollectionEquivalentConstraint : CollectionItemsEqualConstraint
- {
- private IEnumerable expected;
-
- /// <summary>
- /// Construct a CollectionEquivalentConstraint
- /// </summary>
- /// <param name="expected"></param>
- public CollectionEquivalentConstraint(IEnumerable expected) : base(expected)
- {
- this.expected = expected;
- this.DisplayName = "equivalent";
- }
-
- /// <summary>
- /// Test whether two collections are equivalent
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable actual)
- {
- // This is just an optimization
- if( expected is ICollection && actual is ICollection )
- if( ((ICollection)actual).Count != ((ICollection)expected).Count )
- return false;
-
- CollectionTally tally = Tally(expected);
- return tally.TryRemove(actual) && tally.Count == 0;
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("equivalent to");
- writer.WriteExpectedValue(expected);
- }
- }
- #endregion
-
- #region CollectionSubsetConstraint
- /// <summary>
- /// CollectionSubsetConstraint is used to determine whether
- /// one collection is a subset of another
- /// </summary>
- public class CollectionSubsetConstraint : CollectionItemsEqualConstraint
- {
- private IEnumerable expected;
-
- /// <summary>
- /// Construct a CollectionSubsetConstraint
- /// </summary>
- /// <param name="expected">The collection that the actual value is expected to be a subset of</param>
- public CollectionSubsetConstraint(IEnumerable expected) : base(expected)
- {
- this.expected = expected;
- this.DisplayName = "subsetof";
- }
-
- /// <summary>
- /// Test whether the actual collection is a subset of
- /// the expected collection provided.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable actual)
- {
- return Tally(expected).TryRemove( actual );
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate( "subset of" );
- writer.WriteExpectedValue(expected);
- }
- }
- #endregion
-
- #region CollectionOrderedConstraint
-
- /// <summary>
- /// CollectionOrderedConstraint is used to test whether a collection is ordered.
- /// </summary>
- public class CollectionOrderedConstraint : CollectionConstraint
- {
- private ComparisonAdapter comparer = ComparisonAdapter.Default;
- private string comparerName;
- private string propertyName;
- private bool descending;
-
- /// <summary>
- /// Construct a CollectionOrderedConstraint
- /// </summary>
- public CollectionOrderedConstraint()
- {
- this.DisplayName = "ordered";
- }
-
- ///<summary>
- /// If used performs a reverse comparison
- ///</summary>
- public CollectionOrderedConstraint Descending
- {
- get
- {
- descending = true;
- return this;
- }
- }
-
- /// <summary>
- /// Modifies the constraint to use an IComparer and returns self.
- /// </summary>
- public CollectionOrderedConstraint Using(IComparer comparer)
- {
- this.comparer = ComparisonAdapter.For( comparer );
- this.comparerName = comparer.GetType().FullName;
- return this;
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// Modifies the constraint to use an IComparer<T> and returns self.
- /// </summary>
- public CollectionOrderedConstraint Using<T>(IComparer<T> comparer)
- {
- this.comparer = ComparisonAdapter.For(comparer);
- this.comparerName = comparer.GetType().FullName;
- return this;
- }
-
- /// <summary>
- /// Modifies the constraint to use a Comparison<T> and returns self.
- /// </summary>
- public CollectionOrderedConstraint Using<T>(Comparison<T> comparer)
- {
- this.comparer = ComparisonAdapter.For(comparer);
- this.comparerName = comparer.GetType().FullName;
- return this;
- }
-#endif
-
- /// <summary>
- /// Modifies the constraint to test ordering by the value of
- /// a specified property and returns self.
- /// </summary>
- public CollectionOrderedConstraint By(string propertyName)
- {
- this.propertyName = propertyName;
- return this;
- }
-
- /// <summary>
- /// Test whether the collection is ordered
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- protected override bool doMatch(IEnumerable actual)
- {
- object previous = null;
- int index = 0;
- foreach(object obj in actual)
- {
- object objToCompare = obj;
- if (obj == null)
- throw new ArgumentNullException("actual", "Null value at index " + index.ToString());
-
- if (this.propertyName != null)
- {
- PropertyInfo prop = obj.GetType().GetProperty(propertyName);
- objToCompare = prop.GetValue(obj, null);
- if (objToCompare == null)
- throw new ArgumentNullException("actual", "Null property value at index " + index.ToString());
- }
-
- if (previous != null)
- {
- //int comparisonResult = comparer.Compare(al[i], al[i + 1]);
- int comparisonResult = comparer.Compare(previous, objToCompare);
-
- if (descending && comparisonResult < 0)
- return false;
- if (!descending && comparisonResult > 0)
- return false;
- }
-
- previous = objToCompare;
- index++;
- }
-
- return true;
- }
-
- /// <summary>
- /// Write a description of the constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- if (propertyName == null)
- writer.Write("collection ordered");
- else
- {
- writer.WritePredicate("collection ordered by");
- writer.WriteExpectedValue(propertyName);
- }
-
- if (descending)
- writer.WriteModifier("descending");
- }
-
- /// <summary>
- /// Returns the string representation of the constraint.
- /// </summary>
- /// <returns></returns>
- protected override string GetStringRepresentation()
- {
- StringBuilder sb = new StringBuilder("<ordered");
-
- if (propertyName != null)
- sb.Append("by " + propertyName);
- if (descending)
- sb.Append(" descending");
- if (comparerName != null)
- sb.Append(" " + comparerName);
-
- sb.Append(">");
-
- return sb.ToString();
- }
- }
- #endregion
-}
=== added file 'src/framework/Constraints/CollectionContainsConstraint.cs'
--- src/framework/Constraints/CollectionContainsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionContainsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionContainsConstraint is used to test whether a collection
+ /// contains an expected object as a member.
+ /// </summary>
+ public class CollectionContainsConstraint : CollectionItemsEqualConstraint
+ {
+ private readonly object expected;
+
+ /// <summary>
+ /// Construct a CollectionContainsConstraint
+ /// </summary>
+ /// <param name="expected"></param>
+ public CollectionContainsConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "contains";
+ }
+
+ /// <summary>
+ /// Test whether the expected item is contained in the collection
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ foreach (object obj in actual)
+ if (ItemsEqual(obj, expected))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Write a descripton of the constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("collection containing");
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionEquivalentConstraint.cs'
--- src/framework/Constraints/CollectionEquivalentConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionEquivalentConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionEquivalentCOnstraint is used to determine whether two
+ /// collections are equivalent.
+ /// </summary>
+ public class CollectionEquivalentConstraint : CollectionItemsEqualConstraint
+ {
+ private readonly IEnumerable expected;
+
+ /// <summary>
+ /// Construct a CollectionEquivalentConstraint
+ /// </summary>
+ /// <param name="expected"></param>
+ public CollectionEquivalentConstraint(IEnumerable expected) : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "equivalent";
+ }
+
+ /// <summary>
+ /// Test whether two collections are equivalent
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ // This is just an optimization
+ if( expected is ICollection && actual is ICollection )
+ if( ((ICollection)actual).Count != ((ICollection)expected).Count )
+ return false;
+
+ CollectionTally tally = Tally(expected);
+ return tally.TryRemove(actual) && tally.Count == 0;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("equivalent to");
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionItemsEqualConstraint.cs'
--- src/framework/Constraints/CollectionItemsEqualConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionItemsEqualConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,140 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionItemsEqualConstraint is the abstract base class for all
+ /// collection constraints that apply some notion of item equality
+ /// as a part of their operation.
+ /// </summary>
+ public abstract class CollectionItemsEqualConstraint : CollectionConstraint
+ {
+ private readonly NUnitEqualityComparer comparer = NUnitEqualityComparer.Default;
+
+ /// <summary>
+ /// Construct an empty CollectionConstraint
+ /// </summary>
+ protected CollectionItemsEqualConstraint() { }
+
+ /// <summary>
+ /// Construct a CollectionConstraint
+ /// </summary>
+ /// <param name="arg"></param>
+ protected CollectionItemsEqualConstraint(object arg) : base(arg) { }
+
+ #region Modifiers
+ /// <summary>
+ /// Flag the constraint to ignore case and return self.
+ /// </summary>
+ public CollectionItemsEqualConstraint IgnoreCase
+ {
+ get
+ {
+ comparer.IgnoreCase = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using(IComparer comparer)
+ {
+ this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied Comparison object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
+ {
+ this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(IEqualityComparer<T> comparer)
+ {
+ this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
+ return this;
+ }
+#endif
+ #endregion
+
+ /// <summary>
+ /// Compares two collection members for equality
+ /// </summary>
+ protected bool ItemsEqual(object x, object y)
+ {
+ return comparer.ObjectsEqual(x, y);
+ }
+
+ /// <summary>
+ /// Return a new CollectionTally for use in making tests
+ /// </summary>
+ /// <param name="c">The collection to be included in the tally</param>
+ protected CollectionTally Tally(IEnumerable c)
+ {
+ return new CollectionTally(comparer, c);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionOperator.cs'
--- src/framework/Constraints/CollectionOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,94 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base for operators that indicate how to
+ /// apply a constraint to items in a collection.
+ /// </summary>
+ public abstract class CollectionOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructs a CollectionOperator
+ /// </summary>
+ protected CollectionOperator()
+ {
+ // Collection Operators stack on everything
+ // and allow all other ops to stack on them
+ this.left_precedence = 1;
+ this.right_precedence = 10;
+ }
+ }
+
+ /// <summary>
+ /// Represents a constraint that succeeds if all the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class AllOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// they all succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new AllItemsConstraint(constraint);
+ }
+ }
+
+ /// <summary>
+ /// Represents a constraint that succeeds if any of the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class SomeOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// any of them succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new SomeItemsConstraint(constraint);
+ }
+ }
+
+ /// <summary>
+ /// Represents a constraint that succeeds if none of the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class NoneOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// none of them succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new NoItemConstraint(constraint);
+ }
+ }
+ }
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionOrderedConstraint.cs'
--- src/framework/Constraints/CollectionOrderedConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionOrderedConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,185 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Text;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionOrderedConstraint is used to test whether a collection is ordered.
+ /// </summary>
+ public class CollectionOrderedConstraint : CollectionConstraint
+ {
+ private ComparisonAdapter comparer = ComparisonAdapter.Default;
+ private string comparerName;
+ private string propertyName;
+ private bool descending;
+
+ /// <summary>
+ /// Construct a CollectionOrderedConstraint
+ /// </summary>
+ public CollectionOrderedConstraint()
+ {
+ this.DisplayName = "ordered";
+ }
+
+ ///<summary>
+ /// If used performs a reverse comparison
+ ///</summary>
+ public CollectionOrderedConstraint Descending
+ {
+ get
+ {
+ descending = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use an IComparer and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using(IComparer comparer)
+ {
+ this.comparer = ComparisonAdapter.For( comparer );
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Modifies the constraint to use an IComparer<T> and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use a Comparison<T> and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+#endif
+
+ /// <summary>
+ /// Modifies the constraint to test ordering by the value of
+ /// a specified property and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint By(string propertyName)
+ {
+ this.propertyName = propertyName;
+ return this;
+ }
+
+ /// <summary>
+ /// Test whether the collection is ordered
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ object previous = null;
+ int index = 0;
+ foreach(object obj in actual)
+ {
+ object objToCompare = obj;
+ if (obj == null)
+ throw new ArgumentNullException("actual", "Null value at index " + index.ToString());
+
+ if (this.propertyName != null)
+ {
+ PropertyInfo prop = obj.GetType().GetProperty(propertyName);
+ objToCompare = prop.GetValue(obj, null);
+ if (objToCompare == null)
+ throw new ArgumentNullException("actual", "Null property value at index " + index.ToString());
+ }
+
+ if (previous != null)
+ {
+ //int comparisonResult = comparer.Compare(al[i], al[i + 1]);
+ int comparisonResult = comparer.Compare(previous, objToCompare);
+
+ if (descending && comparisonResult < 0)
+ return false;
+ if (!descending && comparisonResult > 0)
+ return false;
+ }
+
+ previous = objToCompare;
+ index++;
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of the constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ if (propertyName == null)
+ writer.Write("collection ordered");
+ else
+ {
+ writer.WritePredicate("collection ordered by");
+ writer.WriteExpectedValue(propertyName);
+ }
+
+ if (descending)
+ writer.WriteModifier("descending");
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GetStringRepresentation()
+ {
+ StringBuilder sb = new StringBuilder("<ordered");
+
+ if (propertyName != null)
+ sb.Append("by " + propertyName);
+ if (descending)
+ sb.Append(" descending");
+ if (comparerName != null)
+ sb.Append(" " + comparerName);
+
+ sb.Append(">");
+
+ return sb.ToString();
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/CollectionSubsetConstraint.cs'
--- src/framework/Constraints/CollectionSubsetConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/CollectionSubsetConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionSubsetConstraint is used to determine whether
+ /// one collection is a subset of another
+ /// </summary>
+ public class CollectionSubsetConstraint : CollectionItemsEqualConstraint
+ {
+ private IEnumerable expected;
+
+ /// <summary>
+ /// Construct a CollectionSubsetConstraint
+ /// </summary>
+ /// <param name="expected">The collection that the actual value is expected to be a subset of</param>
+ public CollectionSubsetConstraint(IEnumerable expected) : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "subsetof";
+ }
+
+ /// <summary>
+ /// Test whether the actual collection is a subset of
+ /// the expected collection provided.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ return Tally(expected).TryRemove( actual );
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate( "subset of" );
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/CollectionTally.cs'
--- src/framework/Constraints/CollectionTally.cs 2010-08-05 04:19:49 +0000
+++ src/framework/Constraints/CollectionTally.cs 2010-09-20 20:37:41 +0000
@@ -1,10 +1,26 @@
-// ****************************************************************
-// Copyright 2010, Charlie Poole
-// This is free software licensed under the NUnit license. You may
-// obtain a copy of the license at http://nunit.org
-// ****************************************************************
-
-using System;
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
using System.Collections;
namespace NUnit.Framework.Constraints
@@ -16,9 +32,9 @@
public class CollectionTally
{
// Internal list used to track occurences
- private ObjectList list = new ObjectList();
+ private readonly ObjectList list = new ObjectList();
- private NUnitEqualityComparer comparer;
+ private readonly NUnitEqualityComparer comparer;
/// <summary>
/// Construct a CollectionTally object from a comparer and a collection
@@ -75,4 +91,4 @@
return true;
}
}
-}
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/ComparisonAdapter.cs'
--- src/framework/Constraints/ComparisonAdapter.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/ComparisonAdapter.cs 2010-09-20 20:37:41 +0000
@@ -1,173 +1,172 @@
-// ***********************************************************************
-// Copyright (c) 2009 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.Collections;
-using System.Reflection;
-#if CLR_2_0 || CLR_4_0
-using System.Collections.Generic;
-#endif
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// ComparisonAdapter class centralizes all comparisons of
- /// values in NUnit, adapting to the use of any provided
- /// IComparer, IComparer<T> or Comparison<T>
- /// </summary>
- public abstract class ComparisonAdapter
- {
- /// <summary>
- /// Gets the default ComparisonAdapter, which wraps an
- /// NUnitComparer object.
- /// </summary>
- public static ComparisonAdapter Default
- {
- get { return new DefaultComparisonAdapter(); }
- }
-
- /// <summary>
- /// Returns a ComparisonAdapter that wraps an IComparer
- /// </summary>
- public static ComparisonAdapter For(IComparer comparer)
- {
- return new ComparerAdapter(comparer);
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// Returns a ComparisonAdapter that wraps an IComparer<T>
- /// </summary>
- public static ComparisonAdapter For<T>(IComparer<T> comparer)
- {
- return new ComparerAdapter<T>(comparer);
- }
-
- /// <summary>
- /// Returns a ComparisonAdapter that wraps a Comparison<T>
- /// </summary>
- public static ComparisonAdapter For<T>(Comparison<T> comparer)
- {
- return new ComparisonAdapterForComparison<T>(comparer);
- }
-#endif
-
- /// <summary>
- /// Compares two objects
- /// </summary>
- public abstract int Compare(object expected, object actual);
-
- class DefaultComparisonAdapter : ComparerAdapter
- {
- /// <summary>
- /// Construct a default ComparisonAdapter
- /// </summary>
- public DefaultComparisonAdapter() : base( NUnitComparer.Default ) { }
- }
-
- class ComparerAdapter : ComparisonAdapter
- {
- private IComparer comparer;
-
- /// <summary>
- /// Construct a ComparisonAdapter for an IComparer
- /// </summary>
- public ComparerAdapter(IComparer comparer)
- {
- this.comparer = comparer;
- }
-
- /// <summary>
- /// Compares two objects
- /// </summary>
- /// <param name="expected"></param>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override int Compare(object expected, object actual)
- {
- return comparer.Compare(expected, actual);
- }
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// ComparisonAdapter<T> extends ComparisonAdapter and
- /// allows use of an IComparer<T> or Comparison<T>
- /// to actually perform the comparison.
- /// </summary>
- class ComparerAdapter<T> : ComparisonAdapter
- {
- private IComparer<T> comparer;
-
- /// <summary>
- /// Construct a ComparisonAdapter for an IComparer<T>
- /// </summary>
- public ComparerAdapter(IComparer<T> comparer)
- {
- this.comparer = comparer;
- }
-
- /// <summary>
- /// Compare a Type T to an object
- /// </summary>
- public override int Compare(object expected, object actual)
- {
- if (!typeof(T).IsAssignableFrom(expected.GetType()))
- throw new ArgumentException("Cannot compare " + expected.ToString());
-
- if (!typeof(T).IsAssignableFrom(actual.GetType()))
- throw new ArgumentException("Cannot compare to " + actual.ToString());
-
- return comparer.Compare((T)expected, (T)actual);
- }
- }
-
- class ComparisonAdapterForComparison<T> : ComparisonAdapter
- {
- private Comparison<T> comparison;
-
- /// <summary>
- /// Construct a ComparisonAdapter for a Comparison<T>
- /// </summary>
- public ComparisonAdapterForComparison(Comparison<T> comparer)
- {
- this.comparison = comparer;
- }
-
- /// <summary>
- /// Compare a Type T to an object
- /// </summary>
- public override int Compare(object expected, object actual)
- {
- if (!typeof(T).IsAssignableFrom(expected.GetType()))
- throw new ArgumentException("Cannot compare " + expected.ToString());
-
- if (!typeof(T).IsAssignableFrom(actual.GetType()))
- throw new ArgumentException("Cannot compare to " + actual.ToString());
-
- return comparison.Invoke((T)expected, (T)actual);
- }
- }
-#endif
- }
-}
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ComparisonAdapter class centralizes all comparisons of
+ /// values in NUnit, adapting to the use of any provided
+ /// IComparer, IComparer<T> or Comparison<T>
+ /// </summary>
+ public abstract class ComparisonAdapter
+ {
+ /// <summary>
+ /// Gets the default ComparisonAdapter, which wraps an
+ /// NUnitComparer object.
+ /// </summary>
+ public static ComparisonAdapter Default
+ {
+ get { return new DefaultComparisonAdapter(); }
+ }
+
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps an IComparer
+ /// </summary>
+ public static ComparisonAdapter For(IComparer comparer)
+ {
+ return new ComparerAdapter(comparer);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps an IComparer<T>
+ /// </summary>
+ public static ComparisonAdapter For<T>(IComparer<T> comparer)
+ {
+ return new ComparerAdapter<T>(comparer);
+ }
+
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps a Comparison<T>
+ /// </summary>
+ public static ComparisonAdapter For<T>(Comparison<T> comparer)
+ {
+ return new ComparisonAdapterForComparison<T>(comparer);
+ }
+#endif
+
+ /// <summary>
+ /// Compares two objects
+ /// </summary>
+ public abstract int Compare(object expected, object actual);
+
+ class DefaultComparisonAdapter : ComparerAdapter
+ {
+ /// <summary>
+ /// Construct a default ComparisonAdapter
+ /// </summary>
+ public DefaultComparisonAdapter() : base( NUnitComparer.Default ) { }
+ }
+
+ class ComparerAdapter : ComparisonAdapter
+ {
+ private readonly IComparer comparer;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for an IComparer
+ /// </summary>
+ public ComparerAdapter(IComparer comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ /// <summary>
+ /// Compares two objects
+ /// </summary>
+ /// <param name="expected"></param>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override int Compare(object expected, object actual)
+ {
+ return comparer.Compare(expected, actual);
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// ComparisonAdapter<T> extends ComparisonAdapter and
+ /// allows use of an IComparer<T> or Comparison<T>
+ /// to actually perform the comparison.
+ /// </summary>
+ class ComparerAdapter<T> : ComparisonAdapter
+ {
+ private readonly IComparer<T> comparer;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for an IComparer<T>
+ /// </summary>
+ public ComparerAdapter(IComparer<T> comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ /// <summary>
+ /// Compare a Type T to an object
+ /// </summary>
+ public override int Compare(object expected, object actual)
+ {
+ if (!typeof(T).IsAssignableFrom(expected.GetType()))
+ throw new ArgumentException("Cannot compare " + expected.ToString());
+
+ if (!typeof(T).IsAssignableFrom(actual.GetType()))
+ throw new ArgumentException("Cannot compare to " + actual.ToString());
+
+ return comparer.Compare((T)expected, (T)actual);
+ }
+ }
+
+ class ComparisonAdapterForComparison<T> : ComparisonAdapter
+ {
+ private readonly Comparison<T> comparison;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for a Comparison<T>
+ /// </summary>
+ public ComparisonAdapterForComparison(Comparison<T> comparer)
+ {
+ this.comparison = comparer;
+ }
+
+ /// <summary>
+ /// Compare a Type T to an object
+ /// </summary>
+ public override int Compare(object expected, object actual)
+ {
+ if (!typeof(T).IsAssignableFrom(expected.GetType()))
+ throw new ArgumentException("Cannot compare " + expected.ToString());
+
+ if (!typeof(T).IsAssignableFrom(actual.GetType()))
+ throw new ArgumentException("Cannot compare to " + actual.ToString());
+
+ return comparison.Invoke((T)expected, (T)actual);
+ }
+ }
+#endif
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/ComparisonConstraint.cs'
--- src/framework/Constraints/ComparisonConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ComparisonConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,142 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for constraints that compare values to
+ /// determine if one is greater than, equal to or less than
+ /// the other.
+ /// </summary>
+ public abstract class ComparisonConstraint : Constraint
+ {
+ /// <summary>
+ /// The value against which a comparison is to be made
+ /// </summary>
+ protected object expected;
+ /// <summary>
+ /// If true, less than returns success
+ /// </summary>
+ protected bool lessComparisonResult = false;
+ /// <summary>
+ /// if true, equal returns success
+ /// </summary>
+ protected bool equalComparisonResult = false;
+ /// <summary>
+ /// if true, greater than returns success
+ /// </summary>
+ protected bool greaterComparisonResult = false;
+ /// <summary>
+ /// The predicate used as a part of the description
+ /// </summary>
+ private readonly string predicate;
+
+ /// <summary>
+ /// ComparisonAdapter to be used in making the comparison
+ /// </summary>
+ private ComparisonAdapter comparer = ComparisonAdapter.Default;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class.
+ /// </summary>
+ /// <param name="value">The value against which to make a comparison.</param>
+ /// <param name="lessComparisonResult">if set to <c>true</c> less succeeds.</param>
+ /// <param name="equalComparisonResult">if set to <c>true</c> equal succeeds.</param>
+ /// <param name="greaterComparisonResult">if set to <c>true</c> greater succeeds.</param>
+ /// <param name="predicate">String used in describing the constraint.</param>
+ protected ComparisonConstraint(object value, bool lessComparisonResult, bool equalComparisonResult, bool greaterComparisonResult, string predicate)
+ : base(value)
+ {
+ this.expected = value;
+ this.lessComparisonResult = lessComparisonResult;
+ this.equalComparisonResult = equalComparisonResult;
+ this.greaterComparisonResult = greaterComparisonResult;
+ this.predicate = predicate;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (expected == null)
+ throw new ArgumentException("Cannot compare using a null reference", "expected");
+
+ if (actual == null)
+ throw new ArgumentException("Cannot compare to null reference", "actual");
+
+ int icomp = comparer.Compare(expected, actual);
+
+ return icomp < 0 && greaterComparisonResult || icomp == 0 && equalComparisonResult || icomp > 0 && lessComparisonResult;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate(predicate);
+ writer.WriteExpectedValue(expected);
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use an IComparer and returns self
+ /// </summary>
+ public ComparisonConstraint Using(IComparer comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Modifies the constraint to use an IComparer<T> and returns self
+ /// </summary>
+ public ComparisonConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use a Comparison<T> and returns self
+ /// </summary>
+ public ComparisonConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+#endif
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/ComparisonConstraints.cs'
--- src/framework/Constraints/ComparisonConstraints.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/ComparisonConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,190 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.Collections;
-#if CLR_2_0 || CLR_4_0
-using System.Collections.Generic;
-#endif
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// Abstract base class for constraints that compare values to
- /// determine if one is greater than, equal to or less than
- /// the other.
- /// </summary>
- public abstract class ComparisonConstraint : Constraint
- {
- /// <summary>
- /// The value against which a comparison is to be made
- /// </summary>
- protected object expected;
- /// <summary>
- /// If true, less than returns success
- /// </summary>
- protected bool ltOK = false;
- /// <summary>
- /// if true, equal returns success
- /// </summary>
- protected bool eqOK = false;
- /// <summary>
- /// if true, greater than returns success
- /// </summary>
- protected bool gtOK = false;
- /// <summary>
- /// The predicate used as a part of the description
- /// </summary>
- private string predicate;
-
- /// <summary>
- /// ComparisonAdapter to be used in making the comparison
- /// </summary>
- private ComparisonAdapter comparer = ComparisonAdapter.Default;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class.
- /// </summary>
- /// <param name="value">The value against which to make a comparison.</param>
- /// <param name="ltOK">if set to <c>true</c> less succeeds.</param>
- /// <param name="eqOK">if set to <c>true</c> equal succeeds.</param>
- /// <param name="gtOK">if set to <c>true</c> greater succeeds.</param>
- /// <param name="predicate">String used in describing the constraint.</param>
- public ComparisonConstraint(object value, bool ltOK, bool eqOK, bool gtOK, string predicate)
- : base(value)
- {
- this.expected = value;
- this.ltOK = ltOK;
- this.eqOK = eqOK;
- this.gtOK = gtOK;
- this.predicate = predicate;
- }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (expected == null)
- throw new ArgumentException("Cannot compare using a null reference", "expected");
-
- if (actual == null)
- throw new ArgumentException("Cannot compare to null reference", "actual");
-
- int icomp = comparer.Compare(expected, actual);
-
- return icomp < 0 && gtOK || icomp == 0 && eqOK || icomp > 0 && ltOK;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate(predicate);
- writer.WriteExpectedValue(expected);
- }
-
- /// <summary>
- /// Modifies the constraint to use an IComparer and returns self
- /// </summary>
- public ComparisonConstraint Using(IComparer comparer)
- {
- this.comparer = ComparisonAdapter.For(comparer);
- return this;
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// Modifies the constraint to use an IComparer<T> and returns self
- /// </summary>
- public ComparisonConstraint Using<T>(IComparer<T> comparer)
- {
- this.comparer = ComparisonAdapter.For(comparer);
- return this;
- }
-
- /// <summary>
- /// Modifies the constraint to use a Comparison<T> and returns self
- /// </summary>
- public ComparisonConstraint Using<T>(Comparison<T> comparer)
- {
- this.comparer = ComparisonAdapter.For(comparer);
- return this;
- }
-#endif
- }
-
- /// <summary>
- /// Tests whether a value is greater than the value supplied to its constructor
- /// </summary>
- public class GreaterThanConstraint : ComparisonConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected value.</param>
- public GreaterThanConstraint(object expected) : base(expected, false, false, true, "greater than") { }
- }
-
- /// <summary>
- /// Tests whether a value is greater than or equal to the value supplied to its constructor
- /// </summary>
- public class GreaterThanOrEqualConstraint : ComparisonConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected value.</param>
- public GreaterThanOrEqualConstraint(object expected) : base(expected, false, true, true, "greater than or equal to") { }
- }
-
- /// <summary>
- /// Tests whether a value is less than the value supplied to its constructor
- /// </summary>
- public class LessThanConstraint : ComparisonConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:LessThanConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected value.</param>
- public LessThanConstraint(object expected) : base(expected, true, false, false, "less than") { }
- }
-
- /// <summary>
- /// Tests whether a value is less than or equal to the value supplied to its constructor
- /// </summary>
- public class LessThanOrEqualConstraint : ComparisonConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected value.</param>
- public LessThanOrEqualConstraint(object expected) : base(expected, true, true, false, "less than or equal to") { }
- }
-}
=== modified file 'src/framework/Constraints/Constraint.cs'
--- src/framework/Constraints/Constraint.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/Constraint.cs 2010-09-20 20:37:41 +0000
@@ -86,16 +86,16 @@
#region Constructors
/// <summary>
/// Construct a constraint with no arguments
- /// </summary>
- public Constraint()
+ /// </summary>
+ protected Constraint()
{
argcnt = 0;
}
/// <summary>
/// Construct a constraint with one argument
- /// </summary>
- public Constraint(object arg)
+ /// </summary>
+ protected Constraint(object arg)
{
argcnt = 1;
this.arg1 = arg;
@@ -103,8 +103,8 @@
/// <summary>
/// Construct a constraint with two arguments
- /// </summary>
- public Constraint(object arg1, object arg2)
+ /// </summary>
+ protected Constraint(object arg1, object arg2)
{
argcnt = 2;
this.arg1 = arg1;
@@ -262,7 +262,7 @@
}
}
- private string _displayable(object o)
+ private static string _displayable(object o)
{
if (o == null) return "null";
@@ -398,4 +398,4 @@
}
#endregion
}
-}
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/ConstraintBuilder.cs'
--- src/framework/Constraints/ConstraintBuilder.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/ConstraintBuilder.cs 2010-09-20 20:37:41 +0000
@@ -22,7 +22,6 @@
// ***********************************************************************
using System;
-using System.Collections;
#if CLR_2_0 || CLR_4_0
using System.Collections.Generic;
#endif
@@ -46,7 +45,7 @@
public class OperatorStack
{
#if CLR_2_0 || CLR_4_0
- private Stack<ConstraintOperator> stack = new Stack<ConstraintOperator>();
+ private readonly Stack<ConstraintOperator> stack = new Stack<ConstraintOperator>();
#else
private Stack stack = new Stack();
#endif
@@ -103,11 +102,11 @@
public class ConstraintStack
{
#if CLR_2_0 || CLR_4_0
- private Stack<Constraint> stack = new Stack<Constraint>();
+ private readonly Stack<Constraint> stack = new Stack<Constraint>();
#else
- private Stack stack = new Stack();
-#endif
- private ConstraintBuilder builder;
+ private readonly Stack stack = new Stack();
+#endif
+ private readonly ConstraintBuilder builder;
/// <summary>
/// Initializes a new instance of the <see cref="T:ConstraintStack"/> class.
@@ -164,9 +163,9 @@
#endregion
#region Instance Fields
- private OperatorStack ops;
+ private readonly OperatorStack ops;
- private ConstraintStack constraints;
+ private readonly ConstraintStack constraints;
private object lastPushed;
#endregion
=== added file 'src/framework/Constraints/ConstraintOperator.cs'
--- src/framework/Constraints/ConstraintOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ConstraintOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,96 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// The ConstraintOperator class is used internally by a
+ /// ConstraintBuilder to represent an operator that
+ /// modifies or combines constraints.
+ ///
+ /// Constraint operators use left and right precedence
+ /// values to determine whether the top operator on the
+ /// stack should be reduced before pushing a new operator.
+ /// </summary>
+ public abstract class ConstraintOperator
+ {
+ private object leftContext;
+ private object rightContext;
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is about to be pushed to the stack.
+ /// </summary>
+ protected int left_precedence;
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is on the top of the stack.
+ /// </summary>
+ protected int right_precedence;
+
+ /// <summary>
+ /// The syntax element preceding this operator
+ /// </summary>
+ public object LeftContext
+ {
+ get { return leftContext; }
+ set { leftContext = value; }
+ }
+
+ /// <summary>
+ /// The syntax element folowing this operator
+ /// </summary>
+ public object RightContext
+ {
+ get { return rightContext; }
+ set { rightContext = value; }
+ }
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is about to be pushed to the stack.
+ /// </summary>
+ public virtual int LeftPrecedence
+ {
+ get { return left_precedence; }
+ }
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is on the top of the stack.
+ /// </summary>
+ public virtual int RightPrecedence
+ {
+ get { return right_precedence; }
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public abstract void Reduce(ConstraintBuilder.ConstraintStack stack);
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/ConstraintOperators.cs'
--- src/framework/Constraints/ConstraintOperators.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/ConstraintOperators.cs 1970-01-01 00:00:00 +0000
@@ -1,497 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2008 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.Collections;
-#if CLR_2_0 || CLR_4_0
-using System.Collections.Generic;
-#endif
-
-namespace NUnit.Framework.Constraints
-{
- #region ConstraintOperator Base Class
- /// <summary>
- /// The ConstraintOperator class is used internally by a
- /// ConstraintBuilder to represent an operator that
- /// modifies or combines constraints.
- ///
- /// Constraint operators use left and right precedence
- /// values to determine whether the top operator on the
- /// stack should be reduced before pushing a new operator.
- /// </summary>
- public abstract class ConstraintOperator
- {
- private object leftContext;
- private object rightContext;
-
- /// <summary>
- /// The precedence value used when the operator
- /// is about to be pushed to the stack.
- /// </summary>
- protected int left_precedence;
-
- /// <summary>
- /// The precedence value used when the operator
- /// is on the top of the stack.
- /// </summary>
- protected int right_precedence;
-
- /// <summary>
- /// The syntax element preceding this operator
- /// </summary>
- public object LeftContext
- {
- get { return leftContext; }
- set { leftContext = value; }
- }
-
- /// <summary>
- /// The syntax element folowing this operator
- /// </summary>
- public object RightContext
- {
- get { return rightContext; }
- set { rightContext = value; }
- }
-
- /// <summary>
- /// The precedence value used when the operator
- /// is about to be pushed to the stack.
- /// </summary>
- public virtual int LeftPrecedence
- {
- get { return left_precedence; }
- }
-
- /// <summary>
- /// The precedence value used when the operator
- /// is on the top of the stack.
- /// </summary>
- public virtual int RightPrecedence
- {
- get { return right_precedence; }
- }
-
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- /// <param name="stack"></param>
- public abstract void Reduce(ConstraintBuilder.ConstraintStack stack);
- }
- #endregion
-
- #region Prefix Operators
-
- #region PrefixOperator
- /// <summary>
- /// PrefixOperator takes a single constraint and modifies
- /// it's action in some way.
- /// </summary>
- public abstract class PrefixOperator : ConstraintOperator
- {
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- /// <param name="stack"></param>
- public override void Reduce(ConstraintBuilder.ConstraintStack stack)
- {
- stack.Push(ApplyPrefix(stack.Pop()));
- }
-
- /// <summary>
- /// Returns the constraint created by applying this
- /// prefix to another constraint.
- /// </summary>
- /// <param name="constraint"></param>
- /// <returns></returns>
- public abstract Constraint ApplyPrefix(Constraint constraint);
- }
- #endregion
-
- #region NotOperator
- /// <summary>
- /// Negates the test of the constraint it wraps.
- /// </summary>
- public class NotOperator : PrefixOperator
- {
- /// <summary>
- /// Constructs a new NotOperator
- /// </summary>
- public NotOperator()
- {
- // Not stacks on anything and only allows other
- // prefix ops to stack on top of it.
- this.left_precedence = this.right_precedence = 1;
- }
-
- /// <summary>
- /// Returns a NotConstraint applied to its argument.
- /// </summary>
- public override Constraint ApplyPrefix(Constraint constraint)
- {
- return new NotConstraint(constraint);
- }
- }
- #endregion
-
- #region Collection Operators
- /// <summary>
- /// Abstract base for operators that indicate how to
- /// apply a constraint to items in a collection.
- /// </summary>
- public abstract class CollectionOperator : PrefixOperator
- {
- /// <summary>
- /// Constructs a CollectionOperator
- /// </summary>
- public CollectionOperator()
- {
- // Collection Operators stack on everything
- // and allow all other ops to stack on them
- this.left_precedence = 1;
- this.right_precedence = 10;
- }
- }
-
- /// <summary>
- /// Represents a constraint that succeeds if all the
- /// members of a collection match a base constraint.
- /// </summary>
- public class AllOperator : CollectionOperator
- {
- /// <summary>
- /// Returns a constraint that will apply the argument
- /// to the members of a collection, succeeding if
- /// they all succeed.
- /// </summary>
- public override Constraint ApplyPrefix(Constraint constraint)
- {
- return new AllItemsConstraint(constraint);
- }
- }
-
- /// <summary>
- /// Represents a constraint that succeeds if any of the
- /// members of a collection match a base constraint.
- /// </summary>
- public class SomeOperator : CollectionOperator
- {
- /// <summary>
- /// Returns a constraint that will apply the argument
- /// to the members of a collection, succeeding if
- /// any of them succeed.
- /// </summary>
- public override Constraint ApplyPrefix(Constraint constraint)
- {
- return new SomeItemsConstraint(constraint);
- }
- }
-
- /// <summary>
- /// Represents a constraint that succeeds if none of the
- /// members of a collection match a base constraint.
- /// </summary>
- public class NoneOperator : CollectionOperator
- {
- /// <summary>
- /// Returns a constraint that will apply the argument
- /// to the members of a collection, succeeding if
- /// none of them succeed.
- /// </summary>
- public override Constraint ApplyPrefix(Constraint constraint)
- {
- return new NoItemConstraint(constraint);
- }
- }
- #endregion
-
- #region WithOperator
- /// <summary>
- /// Represents a constraint that simply wraps the
- /// constraint provided as an argument, without any
- /// further functionality, but which modifes the
- /// order of evaluation because of its precedence.
- /// </summary>
- public class WithOperator : PrefixOperator
- {
- /// <summary>
- /// Constructor for the WithOperator
- /// </summary>
- public WithOperator()
- {
- this.left_precedence = 1;
- this.right_precedence = 4;
- }
-
- /// <summary>
- /// Returns a constraint that wraps its argument
- /// </summary>
- public override Constraint ApplyPrefix(Constraint constraint)
- {
- return constraint;
- }
- }
- #endregion
-
- #region SelfResolving Operators
-
- #region SelfResolvingOperator
- /// <summary>
- /// Abstract base class for operators that are able to reduce to a
- /// constraint whether or not another syntactic element follows.
- /// </summary>
- public abstract class SelfResolvingOperator : ConstraintOperator
- {
- }
- #endregion
-
- #region PropOperator
- /// <summary>
- /// Operator used to test for the presence of a named Property
- /// on an object and optionally apply further tests to the
- /// value of that property.
- /// </summary>
- public class PropOperator : SelfResolvingOperator
- {
- private string name;
-
- /// <summary>
- /// Gets the name of the property to which the operator applies
- /// </summary>
- public string Name
- {
- get { return name; }
- }
-
- /// <summary>
- /// Constructs a PropOperator for a particular named property
- /// </summary>
- public PropOperator(string name)
- {
- this.name = name;
-
- // Prop stacks on anything and allows only
- // prefix operators to stack on it.
- this.left_precedence = this.right_precedence = 1;
- }
-
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- /// <param name="stack"></param>
- public override void Reduce(ConstraintBuilder.ConstraintStack stack)
- {
- if (RightContext == null || RightContext is BinaryOperator)
- stack.Push(new PropertyExistsConstraint(name));
- else
- stack.Push(new PropertyConstraint(name, stack.Pop()));
- }
- }
- #endregion
-
- #region AttributeOperator
- /// <summary>
- /// Operator that tests for the presence of a particular attribute
- /// on a type and optionally applies further tests to the attribute.
- /// </summary>
- public class AttributeOperator : SelfResolvingOperator
- {
- private Type type;
-
- /// <summary>
- /// Construct an AttributeOperator for a particular Type
- /// </summary>
- /// <param name="type">The Type of attribute tested</param>
- public AttributeOperator(Type type)
- {
- this.type = type;
-
- // Attribute stacks on anything and allows only
- // prefix operators to stack on it.
- this.left_precedence = this.right_precedence = 1;
- }
-
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- public override void Reduce(ConstraintBuilder.ConstraintStack stack)
- {
- if (RightContext == null || RightContext is BinaryOperator)
- stack.Push(new AttributeExistsConstraint(type));
- else
- stack.Push(new AttributeConstraint(type, stack.Pop()));
- }
- }
- #endregion
-
- #region ThrowsOperator
- /// <summary>
- /// Operator that tests that an exception is thrown and
- /// optionally applies further tests to the exception.
- /// </summary>
- public class ThrowsOperator : SelfResolvingOperator
- {
- /// <summary>
- /// Construct a ThrowsOperator
- /// </summary>
- public ThrowsOperator()
- {
- // ThrowsOperator stacks on everything but
- // it's always the first item on the stack
- // anyway. It is evaluated last of all ops.
- this.left_precedence = 1;
- this.right_precedence = 100;
- }
-
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- public override void Reduce(ConstraintBuilder.ConstraintStack stack)
- {
- if (RightContext == null || RightContext is BinaryOperator)
- stack.Push(new ThrowsConstraint(null));
- else
- stack.Push(new ThrowsConstraint(stack.Pop()));
- }
- }
- #endregion
-
- #endregion
-
- #endregion
-
- #region Binary Operators
-
- #region BinaryOperator
- /// <summary>
- /// Abstract base class for all binary operators
- /// </summary>
- public abstract class BinaryOperator : ConstraintOperator
- {
- /// <summary>
- /// Reduce produces a constraint from the operator and
- /// any arguments. It takes the arguments from the constraint
- /// stack and pushes the resulting constraint on it.
- /// </summary>
- /// <param name="stack"></param>
- public override void Reduce(ConstraintBuilder.ConstraintStack stack)
- {
- Constraint right = stack.Pop();
- Constraint left = stack.Pop();
- stack.Push(ApplyOperator(left, right));
- }
-
- /// <summary>
- /// Gets the left precedence of the operator
- /// </summary>
- public override int LeftPrecedence
- {
- get
- {
- return RightContext is CollectionOperator
- ? base.LeftPrecedence + 10
- : base.LeftPrecedence;
- }
- }
-
- /// <summary>
- /// Gets the right precedence of the operator
- /// </summary>
- public override int RightPrecedence
- {
- get
- {
- return RightContext is CollectionOperator
- ? base.RightPrecedence + 10
- : base.RightPrecedence;
- }
- }
-
- /// <summary>
- /// Abstract method that produces a constraint by applying
- /// the operator to its left and right constraint arguments.
- /// </summary>
- public abstract Constraint ApplyOperator(Constraint left, Constraint right);
- }
- #endregion
-
- #region AndOperator
- /// <summary>
- /// Operator that requires both it's arguments to succeed
- /// </summary>
- public class AndOperator : BinaryOperator
- {
- /// <summary>
- /// Construct an AndOperator
- /// </summary>
- public AndOperator()
- {
- this.left_precedence = this.right_precedence = 2;
- }
-
- /// <summary>
- /// Apply the operator to produce an AndConstraint
- /// </summary>
- public override Constraint ApplyOperator(Constraint left, Constraint right)
- {
- return new AndConstraint(left, right);
- }
- }
- #endregion
-
- #region OrOperator
- /// <summary>
- /// Operator that requires at least one of it's arguments to succeed
- /// </summary>
- public class OrOperator : BinaryOperator
- {
- /// <summary>
- /// Construct an OrOperator
- /// </summary>
- public OrOperator()
- {
- this.left_precedence = this.right_precedence = 3;
- }
-
- /// <summary>
- /// Apply the operator to produce an OrConstraint
- /// </summary>
- public override Constraint ApplyOperator(Constraint left, Constraint right)
- {
- return new OrConstraint(left, right);
- }
- }
- #endregion
-
- #endregion
-}
=== modified file 'src/framework/Constraints/ContainsConstraint.cs'
--- src/framework/Constraints/ContainsConstraint.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/ContainsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -34,8 +34,8 @@
/// or as a substring of another string using the same syntax.
/// </summary>
public class ContainsConstraint : Constraint
- {
- object expected;
+ {
+ readonly object expected;
Constraint realConstraint;
bool ignoreCase;
=== added file 'src/framework/Constraints/EmptyCollectionConstraint.cs'
--- src/framework/Constraints/EmptyCollectionConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/EmptyCollectionConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyCollectionConstraint tests whether a collection is empty.
+ /// </summary>
+ public class EmptyCollectionConstraint : CollectionConstraint
+ {
+ /// <summary>
+ /// Check that the collection is empty
+ /// </summary>
+ /// <param name="collection"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable collection)
+ {
+ return IsEmpty( collection );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write( "<empty>" );
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/EmptyStringConstraint.cs'
--- src/framework/Constraints/EmptyStringConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/EmptyStringConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyStringConstraint tests whether a string is empty.
+ /// </summary>
+ public class EmptyStringConstraint : Constraint
+ {
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is string))
+ return false;
+
+ return (string)actual == string.Empty;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("<empty>");
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/EndsWithConstraint.cs'
--- src/framework/Constraints/EndsWithConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/EndsWithConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EndsWithConstraint can test whether a string ends
+ /// with an expected substring.
+ /// </summary>
+ public class EndsWithConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected string</param>
+ public EndsWithConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is matched by the actual value.
+ /// This is a template method, which calls the IsMatch method
+ /// of the derived class.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is string))
+ return false;
+
+ if ( this.caseInsensitive )
+ return ((string)actual).ToLower().EndsWith(expected.ToLower());
+ else
+ return ((string)actual).EndsWith(expected);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String ending with");
+ writer.WriteExpectedValue(expected);
+ if ( this.caseInsensitive )
+ writer.WriteModifier( "ignoring case" );
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/EqualityAdapter.cs'
--- src/framework/Constraints/EqualityAdapter.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/EqualityAdapter.cs 2010-09-20 20:37:41 +0000
@@ -84,7 +84,7 @@
class EqualityComparerAdapter : EqualityAdapter
{
- private IEqualityComparer comparer;
+ private readonly IEqualityComparer comparer;
public EqualityComparerAdapter(IEqualityComparer comparer)
{
@@ -99,7 +99,7 @@
class EqualityComparerAdapter<T> : EqualityAdapter
{
- private IEqualityComparer<T> comparer;
+ private readonly IEqualityComparer<T> comparer;
public EqualityComparerAdapter(IEqualityComparer<T> comparer)
{
@@ -121,7 +121,7 @@
class ComparisonAdapterAdapter : EqualityAdapter
{
- private ComparisonAdapter comparer;
+ private readonly ComparisonAdapter comparer;
public ComparisonAdapterAdapter(ComparisonAdapter comparer)
{
=== added file 'src/framework/Constraints/ExactTypeConstraint.cs'
--- src/framework/Constraints/ExactTypeConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ExactTypeConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,64 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ExactTypeConstraint is used to test that an object
+ /// is of the exact type provided in the constructor
+ /// </summary>
+ public class ExactTypeConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an ExactTypeConstraint for a given Type
+ /// </summary>
+ /// <param name="type">The expected Type.</param>
+ public ExactTypeConstraint(Type type)
+ : base(type)
+ {
+ this.DisplayName = "typeof";
+ }
+
+ /// <summary>
+ /// Test that an object is of the exact type specified
+ /// </summary>
+ /// <param name="actual">The actual value.</param>
+ /// <returns>True if the tested object is of the exact type provided, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && actual.GetType() == this.expectedType;
+ }
+
+ /// <summary>
+ /// Write the description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/FalseConstraint.cs'
--- src/framework/Constraints/FalseConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/FalseConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// FalseConstraint tests that the actual value is false
+ /// </summary>
+ public class FalseConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:FalseConstraint"/> class.
+ /// </summary>
+ public FalseConstraint() : base(false, "False") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/GreaterThanConstraint.cs'
--- src/framework/Constraints/GreaterThanConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/GreaterThanConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,37 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is greater than the value supplied to its constructor
+ /// </summary>
+ public class GreaterThanConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public GreaterThanConstraint(object expected) : base(expected, false, false, true, "greater than") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/GreaterThanOrEqualConstraint.cs'
--- src/framework/Constraints/GreaterThanOrEqualConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/GreaterThanOrEqualConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,37 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is greater than or equal to the value supplied to its constructor
+ /// </summary>
+ public class GreaterThanOrEqualConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public GreaterThanOrEqualConstraint(object expected) : base(expected, false, true, true, "greater than or equal to") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/InstanceOfTypeConstraint.cs'
--- src/framework/Constraints/InstanceOfTypeConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/InstanceOfTypeConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// InstanceOfTypeConstraint is used to test that an object
+ /// is of the same type provided or derived from it.
+ /// </summary>
+ public class InstanceOfTypeConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an InstanceOfTypeConstraint for the type provided
+ /// </summary>
+ /// <param name="type">The expected Type</param>
+ public InstanceOfTypeConstraint(Type type)
+ : base(type)
+ {
+ this.DisplayName = "instanceof";
+ }
+
+ /// <summary>
+ /// Test whether an object is of the specified type or a derived type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object is of the provided type or derives from it, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && expectedType.IsInstanceOfType(actual);
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("instance of");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/LessThanConstraint.cs'
--- src/framework/Constraints/LessThanConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/LessThanConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,37 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is less than the value supplied to its constructor
+ /// </summary>
+ public class LessThanConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:LessThanConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public LessThanConstraint(object expected) : base(expected, true, false, false, "less than") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/LessThanOrEqualConstraint.cs'
--- src/framework/Constraints/LessThanOrEqualConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/LessThanOrEqualConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,37 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is less than or equal to the value supplied to its constructor
+ /// </summary>
+ public class LessThanOrEqualConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public LessThanOrEqualConstraint(object expected) : base(expected, true, true, false, "less than or equal to") { }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/MessageWriter.cs'
--- src/framework/Constraints/MessageWriter.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/MessageWriter.cs 2010-09-20 20:37:41 +0000
@@ -38,8 +38,8 @@
/// <summary>
/// Construct a MessageWriter given a culture
- /// </summary>
- public MessageWriter() : base( System.Globalization.CultureInfo.InvariantCulture ) { }
+ /// </summary>
+ protected MessageWriter() : base( System.Globalization.CultureInfo.InvariantCulture ) { }
/// <summary>
/// Abstract method to get the max line length
=== modified file 'src/framework/Constraints/MsgUtils.cs'
--- src/framework/Constraints/MsgUtils.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/MsgUtils.cs 2010-09-20 20:37:41 +0000
@@ -35,7 +35,7 @@
/// <summary>
/// Static string used when strings are clipped
/// </summary>
- private static readonly string ELLIPSIS = "...";
+ private const string ELLIPSIS = "...";
/// <summary>
/// Returns the representation of a type as used in NUnitLite.
@@ -84,18 +84,16 @@
{
StringBuilder sb = new StringBuilder();
- for (int i = 0; i < s.Length; i++)
- {
- char c = s[i];
-
+ foreach (char c in s)
+ {
switch (c)
{
- //case '\'':
- // sb.Append("\\\'");
- // break;
- //case '\"':
- // sb.Append("\\\"");
- // break;
+ //case '\'':
+ // sb.Append("\\\'");
+ // break;
+ //case '\"':
+ // sb.Append("\\\"");
+ // break;
case '\\':
sb.Append("\\\\");
break;
@@ -133,7 +131,7 @@
default:
sb.Append(c);
break;
- }
+ }
}
s = sb.ToString();
=== modified file 'src/framework/Constraints/NUnitEqualityComparer.cs'
--- src/framework/Constraints/NUnitEqualityComparer.cs 2010-07-27 21:54:39 +0000
+++ src/framework/Constraints/NUnitEqualityComparer.cs 2010-09-20 20:37:41 +0000
@@ -254,7 +254,7 @@
IEnumerator expectedEnum = x.GetEnumerator();
IEnumerator actualEnum = y.GetEnumerator();
- int count = 0;
+ const int count = 0;
for (; ; )
{
bool expectedHasData = expectedEnum.MoveNext();
@@ -278,7 +278,7 @@
/// <param name="x">first directory to compare</param>
/// <param name="y">second directory to compare</param>
/// <returns>true if equivalent, false if not</returns>
- private bool DirectoriesEqual(DirectoryInfo x, DirectoryInfo y)
+ private static bool DirectoriesEqual(DirectoryInfo x, DirectoryInfo y)
{
return x.Attributes == y.Attributes
&& x.CreationTime == y.CreationTime
=== added file 'src/framework/Constraints/NaNConstraint.cs'
--- src/framework/Constraints/NaNConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NaNConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,53 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NaNConstraint tests that the actual value is a double or float NaN
+ /// </summary>
+ public class NaNConstraint : Constraint
+ {
+ /// <summary>
+ /// Test that the actual value is an NaN
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return actual is double && double.IsNaN((double)actual)
+ || actual is float && float.IsNaN((float)actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a specified writer
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("NaN");
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/NoItemConstraint.cs'
--- src/framework/Constraints/NoItemConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NoItemConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NoItemConstraint applies another constraint to each
+ /// item in a collection, failing if any of them succeeds.
+ /// </summary>
+ public class NoItemConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct a SomeItemsConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public NoItemConstraint(Constraint itemConstraint)
+ : base( itemConstraint )
+ {
+ this.DisplayName = "none";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// failing if any item fails.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is IEnumerable) )
+ throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
+
+ foreach(object item in (IEnumerable)actual)
+ if (baseConstraint.Matches(item))
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("no item");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/NotConstraint.cs'
--- src/framework/Constraints/NotConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NotConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NotConstraint negates the effect of some other constraint
+ /// </summary>
+ public class NotConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:NotConstraint"/> class.
+ /// </summary>
+ /// <param name="baseConstraint">The base constraint to be negated.</param>
+ public NotConstraint(Constraint baseConstraint)
+ : base( baseConstraint ) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for if the base constraint fails, false if it succeeds</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return !baseConstraint.Matches(actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo( MessageWriter writer )
+ {
+ writer.WritePredicate( "not" );
+ baseConstraint.WriteDescriptionTo( writer );
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a MessageWriter.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ baseConstraint.WriteActualValueTo (writer);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/NotOperator.cs'
--- src/framework/Constraints/NotOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NotOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Negates the test of the constraint it wraps.
+ /// </summary>
+ public class NotOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructs a new NotOperator
+ /// </summary>
+ public NotOperator()
+ {
+ // Not stacks on anything and only allows other
+ // prefix ops to stack on top of it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Returns a NotConstraint applied to its argument.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new NotConstraint(constraint);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/NullConstraint.cs'
--- src/framework/Constraints/NullConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NullConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NullConstraint tests that the actual value is null
+ /// </summary>
+ public class NullConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:NullConstraint"/> class.
+ /// </summary>
+ public NullConstraint() : base(null, "null") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/NullOrEmptyStringConstraint.cs'
--- src/framework/Constraints/NullOrEmptyStringConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/NullOrEmptyStringConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NullEmptyStringConstraint tests whether a string is either null or empty.
+ /// </summary>
+ public class NullOrEmptyStringConstraint : Constraint
+ {
+ /// <summary>
+ /// Constructs a new NullOrEmptyStringConstraint
+ /// </summary>
+ public NullOrEmptyStringConstraint()
+ {
+ this.DisplayName = "nullorempty";
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null)
+ return true;
+
+ if (!(actual is string))
+ throw new ArgumentException("Actual value must be a string", "actual");
+
+ return (string)actual == string.Empty;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("null or empty string");
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/OrConstraint.cs'
--- src/framework/Constraints/OrConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/OrConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// OrConstraint succeeds if either member succeeds
+ /// </summary>
+ public class OrConstraint : BinaryConstraint
+ {
+ /// <summary>
+ /// Create an OrConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ public OrConstraint(Constraint left, Constraint right) : base(left, right) { }
+
+ /// <summary>
+ /// Apply the member constraints to an actual value, succeeding
+ /// succeeding as soon as one of them succeeds.
+ /// </summary>
+ /// <param name="actual">The actual value</param>
+ /// <returns>True if either constraint succeeded</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return Left.Matches(actual) || Right.Matches(actual);
+ }
+
+ /// <summary>
+ /// Write a description for this contraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to receive the description</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ Left.WriteDescriptionTo(writer);
+ writer.WriteConnector("or");
+ Right.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/OrOperator.cs'
--- src/framework/Constraints/OrOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/OrOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that requires at least one of it's arguments to succeed
+ /// </summary>
+ public class OrOperator : BinaryOperator
+ {
+ /// <summary>
+ /// Construct an OrOperator
+ /// </summary>
+ public OrOperator()
+ {
+ this.left_precedence = this.right_precedence = 3;
+ }
+
+ /// <summary>
+ /// Apply the operator to produce an OrConstraint
+ /// </summary>
+ public override Constraint ApplyOperator(Constraint left, Constraint right)
+ {
+ return new OrConstraint(left, right);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/PathConstraint.cs'
--- src/framework/Constraints/PathConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/PathConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,163 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.IO;
+
+namespace NUnit.Framework.Constraints
+{
+ #region PathConstraint
+ /// <summary>
+ /// PathConstraint serves as the abstract base of constraints
+ /// that operate on paths and provides several helper methods.
+ /// </summary>
+ public abstract class PathConstraint : Constraint
+ {
+ private static readonly char[] DirectorySeparatorChars = new char[] { '\\', '/' };
+
+ /// <summary>
+ /// The expected path used in the constraint
+ /// </summary>
+ protected string expected;
+
+ /// <summary>
+ /// Flag indicating whether a caseInsensitive comparison should be made
+ /// </summary>
+ protected bool caseInsensitive = Path.DirectorySeparatorChar == '\\';
+
+ /// <summary>
+ /// Construct a PathConstraint for a give expected path
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ protected PathConstraint( string expected ) : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Modifies the current instance to be case-insensitve
+ /// and returns it.
+ /// </summary>
+ public PathConstraint IgnoreCase
+ {
+ get { caseInsensitive = true; return this; }
+ }
+
+ /// <summary>
+ /// Modifies the current instance to be case-sensitve
+ /// and returns it.
+ /// </summary>
+ public PathConstraint RespectCase
+ {
+ get { caseInsensitive = false; return this; }
+ }
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format( "<{0} \"{1}\" {2}>", DisplayName, expected, caseInsensitive ? "ignorecase" : "respectcase" );
+ }
+
+ #region Helper Methods
+ /// <summary>
+ /// Canonicalize the provided path
+ /// </summary>
+ /// <param name="path"></param>
+ /// <returns>The path in standardized form</returns>
+ protected string Canonicalize( string path )
+ {
+ string[] parts = path.Split( DirectorySeparatorChars );
+
+ int count = 0;
+ bool shifting = false;
+ foreach( string part in parts )
+ {
+ switch( part )
+ {
+ case ".":
+ shifting = true;
+ break;
+
+ case "..":
+ shifting = true;
+ if ( count > 0 )
+ --count;
+ break;
+ default:
+ if (shifting)
+ parts[count] = part;
+ ++count;
+ break;
+ }
+ }
+
+ return String.Join( Path.DirectorySeparatorChar.ToString(), parts, 0, count );
+ }
+
+ /// <summary>
+ /// Test whether two paths are the same
+ /// </summary>
+ /// <param name="path1">The first path</param>
+ /// <param name="path2">The second path</param>
+ /// <returns></returns>
+ protected bool IsSamePath( string path1, string path2 )
+ {
+ return string.Compare( Canonicalize( expected ), Canonicalize( (string)actual ), caseInsensitive ) == 0;
+ }
+
+ /// <summary>
+ /// Test whether one path is the same as or under another path
+ /// </summary>
+ /// <param name="path1">The first path - supposed to be the parent path</param>
+ /// <param name="path2">The second path - supposed to be the child path</param>
+ /// <returns></returns>
+ protected bool IsSamePathOrUnder( string path1, string path2 )
+ {
+ path1 = Canonicalize( path1 );
+ path2 = Canonicalize( path2 );
+
+ int length1 = path1.Length;
+ int length2 = path2.Length;
+
+ // if path1 is longer, then path2 can't be under it
+ if ( length1 > length2 )
+ return false;
+
+ // if lengths are the same, check for equality
+ if ( length1 == length2 )
+ return string.Compare( path1, path2, caseInsensitive ) == 0;
+
+ // path 2 is longer than path 1: see if initial parts match
+ if ( string.Compare( path1, path2.Substring( 0, length1 ), caseInsensitive ) != 0 )
+ return false;
+
+ // must match through or up to a directory separator boundary
+ return path2[length1-1] == Path.DirectorySeparatorChar ||
+ path2[length1] == Path.DirectorySeparatorChar;
+ }
+ #endregion
+ }
+ #endregion
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/PathConstraints.cs'
--- src/framework/Constraints/PathConstraints.cs 2010-07-26 18:53:17 +0000
+++ src/framework/Constraints/PathConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,242 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2008 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.IO;
-using System.Collections;
-
-namespace NUnit.Framework.Constraints
-{
- #region PathConstraint
- /// <summary>
- /// PathConstraint serves as the abstract base of constraints
- /// that operate on paths and provides several helper methods.
- /// </summary>
- public abstract class PathConstraint : Constraint
- {
- private static readonly char[] DirectorySeparatorChars = new char[] { '\\', '/' };
-
- /// <summary>
- /// The expected path used in the constraint
- /// </summary>
- protected string expected;
-
- /// <summary>
- /// Flag indicating whether a caseInsensitive comparison should be made
- /// </summary>
- protected bool caseInsensitive = Path.DirectorySeparatorChar == '\\';
-
- /// <summary>
- /// Construct a PathConstraint for a give expected path
- /// </summary>
- /// <param name="expected">The expected path</param>
- protected PathConstraint( string expected ) : base(expected)
- {
- this.expected = expected;
- }
-
- /// <summary>
- /// Modifies the current instance to be case-insensitve
- /// and returns it.
- /// </summary>
- public PathConstraint IgnoreCase
- {
- get { caseInsensitive = true; return this; }
- }
-
- /// <summary>
- /// Modifies the current instance to be case-sensitve
- /// and returns it.
- /// </summary>
- public PathConstraint RespectCase
- {
- get { caseInsensitive = false; return this; }
- }
-
- /// <summary>
- /// Returns the string representation of this constraint
- /// </summary>
- protected override string GetStringRepresentation()
- {
- return string.Format( "<{0} \"{1}\" {2}>", DisplayName, expected, caseInsensitive ? "ignorecase" : "respectcase" );
- }
-
- #region Helper Methods
- /// <summary>
- /// Canonicalize the provided path
- /// </summary>
- /// <param name="path"></param>
- /// <returns>The path in standardized form</returns>
- protected string Canonicalize( string path )
- {
- string[] parts = path.Split( DirectorySeparatorChars );
-
- int count = 0;
- bool shifting = false;
- foreach( string part in parts )
- {
- switch( part )
- {
- case ".":
- shifting = true;
- break;
-
- case "..":
- shifting = true;
- if ( count > 0 )
- --count;
- break;
- default:
- if (shifting)
- parts[count] = part;
- ++count;
- break;
- }
- }
-
- return String.Join( Path.DirectorySeparatorChar.ToString(), parts, 0, count );
- }
-
- /// <summary>
- /// Test whether two paths are the same
- /// </summary>
- /// <param name="path1">The first path</param>
- /// <param name="path2">The second path</param>
- /// <returns></returns>
- protected bool IsSamePath( string path1, string path2 )
- {
- return string.Compare( Canonicalize( expected ), Canonicalize( (string)actual ), caseInsensitive ) == 0;
- }
-
- /// <summary>
- /// Test whether one path is the same as or under another path
- /// </summary>
- /// <param name="path1">The first path - supposed to be the parent path</param>
- /// <param name="path2">The second path - supposed to be the child path</param>
- /// <returns></returns>
- protected bool IsSamePathOrUnder( string path1, string path2 )
- {
- path1 = Canonicalize( path1 );
- path2 = Canonicalize( path2 );
-
- int length1 = path1.Length;
- int length2 = path2.Length;
-
- // if path1 is longer, then path2 can't be under it
- if ( length1 > length2 )
- return false;
-
- // if lengths are the same, check for equality
- if ( length1 == length2 )
- return string.Compare( path1, path2, caseInsensitive ) == 0;
-
- // path 2 is longer than path 1: see if initial parts match
- if ( string.Compare( path1, path2.Substring( 0, length1 ), caseInsensitive ) != 0 )
- return false;
-
- // must match through or up to a directory separator boundary
- return path2[length1-1] == Path.DirectorySeparatorChar ||
- path2[length1] == Path.DirectorySeparatorChar;
- }
- #endregion
- }
- #endregion
-
- #region SamePathConstraint
- /// <summary>
- /// Summary description for SamePathConstraint.
- /// </summary>
- public class SamePathConstraint : PathConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:SamePathConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected path</param>
- public SamePathConstraint( string expected ) : base( expected ) { }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is string) )
- return false;
-
- return IsSamePath( expected, (string)actual );
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate( "Path matching" );
- writer.WriteExpectedValue( expected );
- }
- }
- #endregion
-
- #region SamePathOrUnderConstraint
- /// <summary>
- /// SamePathOrUnderConstraint tests that one path is under another
- /// </summary>
- public class SamePathOrUnderConstraint : PathConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:SamePathOrUnderConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected path</param>
- public SamePathOrUnderConstraint( string expected ) : base( expected ) { }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is string) )
- return false;
-
- return IsSamePathOrUnder( expected, (string) actual );
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate( "Path under or matching" );
- writer.WriteExpectedValue( expected );
- }
- }
- #endregion
-}
=== modified file 'src/framework/Constraints/PredicateConstraint.cs'
--- src/framework/Constraints/PredicateConstraint.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/PredicateConstraint.cs 2010-09-20 20:37:41 +0000
@@ -32,8 +32,8 @@
/// returning success if the predicate is true.
/// </summary>
public class PredicateConstraint<T> : Constraint
- {
- Predicate<T> predicate;
+ {
+ readonly Predicate<T> predicate;
/// <summary>
/// Construct a PredicateConstraint from a predicate
=== added file 'src/framework/Constraints/PrefixConstraint.cs'
--- src/framework/Constraints/PrefixConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/PrefixConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,46 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class used for prefixes
+ /// </summary>
+ public abstract class PrefixConstraint : Constraint
+ {
+ /// <summary>
+ /// The base constraint
+ /// </summary>
+ protected Constraint baseConstraint;
+
+ /// <summary>
+ /// Construct given a base constraint
+ /// </summary>
+ /// <param name="resolvable"></param>
+ protected PrefixConstraint(IResolveConstraint resolvable) : base(resolvable)
+ {
+ if ( resolvable != null )
+ this.baseConstraint = resolvable.Resolve();
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/PrefixConstraints.cs'
--- src/framework/Constraints/PrefixConstraints.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/PrefixConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,243 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-using System.Collections;
-
-namespace NUnit.Framework.Constraints
-{
- #region PrefixConstraint
- /// <summary>
- /// Abstract base class used for prefixes
- /// </summary>
- public abstract class PrefixConstraint : Constraint
- {
- /// <summary>
- /// The base constraint
- /// </summary>
- protected Constraint baseConstraint;
-
- /// <summary>
- /// Construct given a base constraint
- /// </summary>
- /// <param name="resolvable"></param>
- protected PrefixConstraint(IResolveConstraint resolvable) : base(resolvable)
- {
- if ( resolvable != null )
- this.baseConstraint = resolvable.Resolve();
- }
- }
- #endregion
-
- #region NotConstraint
- /// <summary>
- /// NotConstraint negates the effect of some other constraint
- /// </summary>
- public class NotConstraint : PrefixConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:NotConstraint"/> class.
- /// </summary>
- /// <param name="baseConstraint">The base constraint to be negated.</param>
- public NotConstraint(Constraint baseConstraint)
- : base( baseConstraint ) { }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for if the base constraint fails, false if it succeeds</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return !baseConstraint.Matches(actual);
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo( MessageWriter writer )
- {
- writer.WritePredicate( "not" );
- baseConstraint.WriteDescriptionTo( writer );
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a MessageWriter.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- baseConstraint.WriteActualValueTo (writer);
- }
- }
- #endregion
-
- #region AllItemsConstraint
- /// <summary>
- /// AllItemsConstraint applies another constraint to each
- /// item in a collection, succeeding if they all succeed.
- /// </summary>
- public class AllItemsConstraint : PrefixConstraint
- {
- /// <summary>
- /// Construct an AllItemsConstraint on top of an existing constraint
- /// </summary>
- /// <param name="itemConstraint"></param>
- public AllItemsConstraint(Constraint itemConstraint)
- : base( itemConstraint )
- {
- this.DisplayName = "all";
- }
-
- /// <summary>
- /// Apply the item constraint to each item in the collection,
- /// failing if any item fails.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is IEnumerable) )
- throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
-
- foreach(object item in (IEnumerable)actual)
- if (!baseConstraint.Matches(item))
- return false;
-
- return true;
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("all items");
- baseConstraint.WriteDescriptionTo(writer);
- }
- }
- #endregion
-
- #region SomeItemsConstraint
- /// <summary>
- /// SomeItemsConstraint applies another constraint to each
- /// item in a collection, succeeding if any of them succeeds.
- /// </summary>
- public class SomeItemsConstraint : PrefixConstraint
- {
- /// <summary>
- /// Construct a SomeItemsConstraint on top of an existing constraint
- /// </summary>
- /// <param name="itemConstraint"></param>
- public SomeItemsConstraint(Constraint itemConstraint)
- : base( itemConstraint )
- {
- this.DisplayName = "some";
- }
-
- /// <summary>
- /// Apply the item constraint to each item in the collection,
- /// succeeding if any item succeeds.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is IEnumerable) )
- throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
-
- foreach(object item in (IEnumerable)actual)
- if (baseConstraint.Matches(item))
- return true;
-
- return false;
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("some item");
- baseConstraint.WriteDescriptionTo(writer);
- }
- }
- #endregion
-
- #region NoItemConstraint
- /// <summary>
- /// NoItemConstraint applies another constraint to each
- /// item in a collection, failing if any of them succeeds.
- /// </summary>
- public class NoItemConstraint : PrefixConstraint
- {
- /// <summary>
- /// Construct a SomeItemsConstraint on top of an existing constraint
- /// </summary>
- /// <param name="itemConstraint"></param>
- public NoItemConstraint(Constraint itemConstraint)
- : base( itemConstraint )
- {
- this.DisplayName = "none";
- }
-
- /// <summary>
- /// Apply the item constraint to each item in the collection,
- /// failing if any item fails.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is IEnumerable) )
- throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
-
- foreach(object item in (IEnumerable)actual)
- if (baseConstraint.Matches(item))
- return false;
-
- return true;
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer"></param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("no item");
- baseConstraint.WriteDescriptionTo(writer);
- }
- }
- #endregion
-}
\ No newline at end of file
=== added file 'src/framework/Constraints/PrefixOperator.cs'
--- src/framework/Constraints/PrefixOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/PrefixOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PrefixOperator takes a single constraint and modifies
+ /// it's action in some way.
+ /// </summary>
+ public abstract class PrefixOperator : ConstraintOperator
+ {
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ stack.Push(ApplyPrefix(stack.Pop()));
+ }
+
+ /// <summary>
+ /// Returns the constraint created by applying this
+ /// prefix to another constraint.
+ /// </summary>
+ /// <param name="constraint"></param>
+ /// <returns></returns>
+ public abstract Constraint ApplyPrefix(Constraint constraint);
+ }
+ }
\ No newline at end of file
=== added file 'src/framework/Constraints/PropOperator.cs'
--- src/framework/Constraints/PropOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/PropOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,69 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator used to test for the presence of a named Property
+ /// on an object and optionally apply further tests to the
+ /// value of that property.
+ /// </summary>
+ public class PropOperator : SelfResolvingOperator
+ {
+ private readonly string name;
+
+ /// <summary>
+ /// Gets the name of the property to which the operator applies
+ /// </summary>
+ public string Name
+ {
+ get { return name; }
+ }
+
+ /// <summary>
+ /// Constructs a PropOperator for a particular named property
+ /// </summary>
+ public PropOperator(string name)
+ {
+ this.name = name;
+
+ // Prop stacks on anything and allows only
+ // prefix operators to stack on it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new PropertyExistsConstraint(name));
+ else
+ stack.Push(new PropertyConstraint(name, stack.Pop()));
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/PropertyConstraint.cs'
--- src/framework/Constraints/PropertyConstraint.cs 2010-07-26 18:53:17 +0000
+++ src/framework/Constraints/PropertyConstraint.cs 2010-09-20 20:37:41 +0000
@@ -27,87 +27,13 @@
namespace NUnit.Framework.Constraints
{
- /// <summary>
- /// PropertyExistsConstraint tests that a named property
- /// exists on the object provided through Match.
- ///
- /// Originally, PropertyConstraint provided this feature
- /// in addition to making optional tests on the vaue
- /// of the property. The two constraints are now separate.
- /// </summary>
- public class PropertyExistsConstraint : Constraint
- {
- private string name;
-
- Type actualType;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:PropertyExistConstraint"/> class.
- /// </summary>
- /// <param name="name">The name of the property.</param>
- public PropertyExistsConstraint(string name) : base(name)
- {
- this.name = name;
- }
-
- /// <summary>
- /// Test whether the property exists for a given object
- /// </summary>
- /// <param name="actual">The object to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (actual == null)
- throw new ArgumentNullException("actual");
-
- this.actualType = actual as Type;
- if (actualType == null)
- actualType = actual.GetType();
-
- PropertyInfo property = actualType.GetProperty(name,
- BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
-
- return property != null;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write("property " + name);
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a
- /// MessageWriter.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- writer.WriteActualValue(actualType);
- }
-
- /// <summary>
- /// Returns the string representation of the constraint.
- /// </summary>
- /// <returns></returns>
- protected override string GetStringRepresentation()
- {
- return string.Format("<propertyexists {0}>", name);
- }
- }
-
/// <summary>
/// PropertyConstraint extracts a named property and uses
/// its value as the actual value for a chained constraint.
/// </summary>
public class PropertyConstraint : PrefixConstraint
{
- private string name;
+ private readonly string name;
private object propValue;
/// <summary>
=== added file 'src/framework/Constraints/PropertyExistsConstraint.cs'
--- src/framework/Constraints/PropertyExistsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/PropertyExistsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,103 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Reflection;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PropertyExistsConstraint tests that a named property
+ /// exists on the object provided through Match.
+ ///
+ /// Originally, PropertyConstraint provided this feature
+ /// in addition to making optional tests on the vaue
+ /// of the property. The two constraints are now separate.
+ /// </summary>
+ public class PropertyExistsConstraint : Constraint
+ {
+ private readonly string name;
+
+ Type actualType;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:PropertyExistConstraint"/> class.
+ /// </summary>
+ /// <param name="name">The name of the property.</param>
+ public PropertyExistsConstraint(string name)
+ : base(name)
+ {
+ this.name = name;
+ }
+
+ /// <summary>
+ /// Test whether the property exists for a given object
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null)
+ throw new ArgumentNullException("actual");
+
+ this.actualType = actual as Type;
+ if (actualType == null)
+ actualType = actual.GetType();
+
+ PropertyInfo property = actualType.GetProperty(name,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
+
+ return property != null;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("property " + name);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(actualType);
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<propertyexists {0}>", name);
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/RangeConstraint.cs'
--- src/framework/Constraints/RangeConstraint.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/RangeConstraint.cs 2010-09-20 20:37:41 +0000
@@ -35,8 +35,8 @@
/// </summary>
public class RangeConstraint : Constraint
{
- private IComparable from;
- private IComparable to;
+ private readonly IComparable from;
+ private readonly IComparable to;
private ComparisonAdapter comparer = ComparisonAdapter.Default;
=== added file 'src/framework/Constraints/RegexConstraint.cs'
--- src/framework/Constraints/RegexConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/RegexConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+#if !NETCF
+using System.Text.RegularExpressions;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+#if !NETCF
+ /// <summary>
+ /// RegexConstraint can test whether a string matches
+ /// the pattern provided.
+ /// </summary>
+ public class RegexConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:RegexConstraint"/> class.
+ /// </summary>
+ /// <param name="pattern">The pattern.</param>
+ public RegexConstraint(string pattern) : base(pattern) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return actual is string &&
+ Regex.IsMatch(
+ (string)actual,
+ this.expected,
+ this.caseInsensitive ? RegexOptions.IgnoreCase : RegexOptions.None );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String matching");
+ writer.WriteExpectedValue(this.expected);
+ if ( this.caseInsensitive )
+ writer.WriteModifier( "ignoring case" );
+ }
+ }
+#endif
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/ResolvableConstraintExpression.cs'
--- src/framework/Constraints/ResolvableConstraintExpression.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/ResolvableConstraintExpression.cs 2010-09-20 20:37:41 +0000
@@ -19,10 +19,8 @@
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-
+// ***********************************************************************
+
namespace NUnit.Framework.Constraints
{
/// <summary>
=== modified file 'src/framework/Constraints/ReusableConstraint.cs'
--- src/framework/Constraints/ReusableConstraint.cs 2010-08-04 21:19:22 +0000
+++ src/framework/Constraints/ReusableConstraint.cs 2010-09-20 20:37:41 +0000
@@ -1,4 +1,25 @@
-using System;
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
namespace NUnit.Framework.Constraints
{
@@ -8,7 +29,7 @@
/// </summary>
public class ReusableConstraint : IResolveConstraint
{
- private Constraint constraint;
+ private readonly Constraint constraint;
/// <summary>
/// Construct a ReusableConstraint from a constraint expression
=== modified file 'src/framework/Constraints/SameAsConstraint.cs'
--- src/framework/Constraints/SameAsConstraint.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/SameAsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -31,7 +31,7 @@
/// </summary>
public class SameAsConstraint : Constraint
{
- private object expected;
+ private readonly object expected;
/// <summary>
/// Initializes a new instance of the <see cref="T:SameAsConstraint"/> class.
=== added file 'src/framework/Constraints/SamePathConstraint.cs'
--- src/framework/Constraints/SamePathConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/SamePathConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Summary description for SamePathConstraint.
+ /// </summary>
+ public class SamePathConstraint : PathConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SamePathConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ public SamePathConstraint( string expected ) : base( expected ) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is string) )
+ return false;
+
+ return IsSamePath( expected, (string)actual );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate( "Path matching" );
+ writer.WriteExpectedValue( expected );
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/SamePathOrUnderConstraint.cs'
--- src/framework/Constraints/SamePathOrUnderConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/SamePathOrUnderConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SamePathOrUnderConstraint tests that one path is under another
+ /// </summary>
+ public class SamePathOrUnderConstraint : PathConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SamePathOrUnderConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ public SamePathOrUnderConstraint( string expected ) : base( expected ) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is string) )
+ return false;
+
+ return IsSamePathOrUnder( expected, (string) actual );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate( "Path under or matching" );
+ writer.WriteExpectedValue( expected );
+ }
+ }
+}
=== added file 'src/framework/Constraints/SelfResolvingOperator.cs'
--- src/framework/Constraints/SelfResolvingOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/SelfResolvingOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,33 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for operators that are able to reduce to a
+ /// constraint whether or not another syntactic element follows.
+ /// </summary>
+ public abstract class SelfResolvingOperator : ConstraintOperator
+ {
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/SomeItemsConstraint.cs'
--- src/framework/Constraints/SomeItemsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/SomeItemsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SomeItemsConstraint applies another constraint to each
+ /// item in a collection, succeeding if any of them succeeds.
+ /// </summary>
+ public class SomeItemsConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct a SomeItemsConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public SomeItemsConstraint(Constraint itemConstraint)
+ : base( itemConstraint )
+ {
+ this.DisplayName = "some";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// succeeding if any item succeeds.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is IEnumerable) )
+ throw new ArgumentException( "The actual value must be an IEnumerable", "actual" );
+
+ foreach(object item in (IEnumerable)actual)
+ if (baseConstraint.Matches(item))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("some item");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/StartsWithConstraint.cs'
--- src/framework/Constraints/StartsWithConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/StartsWithConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// StartsWithConstraint can test whether a string starts
+ /// with an expected substring.
+ /// </summary>
+ public class StartsWithConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected string</param>
+ public StartsWithConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is matched by the actual value.
+ /// This is a template method, which calls the IsMatch method
+ /// of the derived class.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is string))
+ return false;
+
+ if ( this.caseInsensitive )
+ return ((string)actual).ToLower().StartsWith(expected.ToLower());
+ else
+ return ((string)actual).StartsWith(expected);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String starting with");
+ writer.WriteExpectedValue( MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0) );
+ if ( this.caseInsensitive )
+ writer.WriteModifier( "ignoring case" );
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/StringConstraint.cs'
--- src/framework/Constraints/StringConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/StringConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// StringConstraint is the abstract base for constraints
+ /// that operate on strings. It supports the IgnoreCase
+ /// modifier for string operations.
+ /// </summary>
+ public abstract class StringConstraint : Constraint
+ {
+ /// <summary>
+ /// The expected value
+ /// </summary>
+ protected string expected;
+
+ /// <summary>
+ /// Indicates whether tests should be case-insensitive
+ /// </summary>
+ protected bool caseInsensitive;
+
+ /// <summary>
+ /// Constructs a StringConstraint given an expected value
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ protected StringConstraint(string expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Modify the constraint to ignore case in matching.
+ /// </summary>
+ public StringConstraint IgnoreCase
+ {
+ get { caseInsensitive = true; return this; }
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/StringConstraints.cs'
--- src/framework/Constraints/StringConstraints.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/StringConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,327 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-#if !NETCF
-using System.Text.RegularExpressions;
-#endif
-
-namespace NUnit.Framework.Constraints
-{
- #region StringConstraint
- /// <summary>
- /// StringConstraint is the abstract base for constraints
- /// that operate on strings. It supports the IgnoreCase
- /// modifier for string operations.
- /// </summary>
- public abstract class StringConstraint : Constraint
- {
- /// <summary>
- /// The expected value
- /// </summary>
- protected string expected;
-
- /// <summary>
- /// Indicates whether tests should be case-insensitive
- /// </summary>
- protected bool caseInsensitive;
-
- /// <summary>
- /// Constructs a StringConstraint given an expected value
- /// </summary>
- /// <param name="expected">The expected value</param>
- public StringConstraint(string expected)
- : base(expected)
- {
- this.expected = expected;
- }
-
- /// <summary>
- /// Modify the constraint to ignore case in matching.
- /// </summary>
- public StringConstraint IgnoreCase
- {
- get { caseInsensitive = true; return this; }
- }
- }
- #endregion
-
- #region EmptyStringConstraint
- /// <summary>
- /// EmptyStringConstraint tests whether a string is empty.
- /// </summary>
- public class EmptyStringConstraint : Constraint
- {
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (!(actual is string))
- return false;
-
- return (string)actual == string.Empty;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write("<empty>");
- }
- }
- #endregion
-
- #region NullOrEmptyStringConstraint
- /// <summary>
- /// NullEmptyStringConstraint tests whether a string is either null or empty.
- /// </summary>
- public class NullOrEmptyStringConstraint : Constraint
- {
- /// <summary>
- /// Constructs a new NullOrEmptyStringConstraint
- /// </summary>
- public NullOrEmptyStringConstraint()
- {
- this.DisplayName = "nullorempty";
- }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (actual == null)
- return true;
-
- if (!(actual is string))
- throw new ArgumentException("Actual value must be a string", "actual");
-
- return (string)actual == string.Empty;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write("null or empty string");
- }
- }
- #endregion
-
- #region Substring Constraint
- /// <summary>
- /// SubstringConstraint can test whether a string contains
- /// the expected substring.
- /// </summary>
- public class SubstringConstraint : StringConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:SubstringConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected.</param>
- public SubstringConstraint(string expected) : base(expected) { }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if ( !(actual is string) )
- return false;
-
- if (this.caseInsensitive)
- return ((string)actual).ToLower().IndexOf(expected.ToLower()) >= 0;
- else
- return ((string)actual).IndexOf(expected) >= 0;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("String containing");
- writer.WriteExpectedValue(expected);
- if ( this.caseInsensitive )
- writer.WriteModifier( "ignoring case" );
- }
- }
- #endregion
-
- #region StartsWithConstraint
- /// <summary>
- /// StartsWithConstraint can test whether a string starts
- /// with an expected substring.
- /// </summary>
- public class StartsWithConstraint : StringConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected string</param>
- public StartsWithConstraint(string expected) : base(expected) { }
-
- /// <summary>
- /// Test whether the constraint is matched by the actual value.
- /// This is a template method, which calls the IsMatch method
- /// of the derived class.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (!(actual is string))
- return false;
-
- if ( this.caseInsensitive )
- return ((string)actual).ToLower().StartsWith(expected.ToLower());
- else
- return ((string)actual).StartsWith(expected);
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("String starting with");
- writer.WriteExpectedValue( MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0) );
- if ( this.caseInsensitive )
- writer.WriteModifier( "ignoring case" );
- }
- }
- #endregion
-
- #region EndsWithConstraint
- /// <summary>
- /// EndsWithConstraint can test whether a string ends
- /// with an expected substring.
- /// </summary>
- public class EndsWithConstraint : StringConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class.
- /// </summary>
- /// <param name="expected">The expected string</param>
- public EndsWithConstraint(string expected) : base(expected) { }
-
- /// <summary>
- /// Test whether the constraint is matched by the actual value.
- /// This is a template method, which calls the IsMatch method
- /// of the derived class.
- /// </summary>
- /// <param name="actual"></param>
- /// <returns></returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- if (!(actual is string))
- return false;
-
- if ( this.caseInsensitive )
- return ((string)actual).ToLower().EndsWith(expected.ToLower());
- else
- return ((string)actual).EndsWith(expected);
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("String ending with");
- writer.WriteExpectedValue(expected);
- if ( this.caseInsensitive )
- writer.WriteModifier( "ignoring case" );
- }
- }
- #endregion
-
- #region RegexConstraint
-#if !NETCF
- /// <summary>
- /// RegexConstraint can test whether a string matches
- /// the pattern provided.
- /// </summary>
- public class RegexConstraint : StringConstraint
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="T:RegexConstraint"/> class.
- /// </summary>
- /// <param name="pattern">The pattern.</param>
- public RegexConstraint(string pattern) : base(pattern) { }
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True for success, false for failure</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
-
- return actual is string &&
- Regex.IsMatch(
- (string)actual,
- this.expected,
- this.caseInsensitive ? RegexOptions.IgnoreCase : RegexOptions.None );
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("String matching");
- writer.WriteExpectedValue(this.expected);
- if ( this.caseInsensitive )
- writer.WriteModifier( "ignoring case" );
- }
- }
-#endif
- #endregion
-}
=== added file 'src/framework/Constraints/SubstringConstraint.cs'
--- src/framework/Constraints/SubstringConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/SubstringConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SubstringConstraint can test whether a string contains
+ /// the expected substring.
+ /// </summary>
+ public class SubstringConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SubstringConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected.</param>
+ public SubstringConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( !(actual is string) )
+ return false;
+
+ if (this.caseInsensitive)
+ return ((string)actual).ToLower().IndexOf(expected.ToLower()) >= 0;
+ else
+ return ((string)actual).IndexOf(expected) >= 0;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String containing");
+ writer.WriteExpectedValue(expected);
+ if ( this.caseInsensitive )
+ writer.WriteModifier( "ignoring case" );
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/ThrowsConstraint.cs'
--- src/framework/Constraints/ThrowsConstraint.cs 2010-08-02 02:42:35 +0000
+++ src/framework/Constraints/ThrowsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -21,178 +21,119 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ***********************************************************************
-using System;
-
-namespace NUnit.Framework.Constraints
-{
- #region ThrowsConstraint
- /// <summary>
- /// ThrowsConstraint is used to test the exception thrown by
- /// a delegate by applying a constraint to it.
- /// </summary>
- public class ThrowsConstraint : PrefixConstraint
- {
- private Exception caughtException;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:ThrowsConstraint"/> class,
- /// using a constraint to be applied to the exception.
- /// </summary>
- /// <param name="baseConstraint">A constraint to apply to the caught exception.</param>
- public ThrowsConstraint(Constraint baseConstraint)
- : base(baseConstraint) { }
-
- /// <summary>
- /// Get the actual exception thrown - used by Assert.Throws.
- /// </summary>
- public Exception ActualException
- {
- get { return caughtException; }
- }
-
- #region Constraint Overrides
- /// <summary>
- /// Executes the code of the delegate and captures any exception.
- /// If a non-null base constraint was provided, it applies that
- /// constraint to the exception.
- /// </summary>
- /// <param name="actual">A delegate representing the code to be tested</param>
- /// <returns>True if an exception is thrown and the constraint succeeds, otherwise false</returns>
- public override bool Matches(object actual)
- {
- TestDelegate code = actual as TestDelegate;
- if (code == null)
- throw new ArgumentException(
- string.Format("The actual value must be a TestDelegate but was {0}",actual.GetType().Name), "actual");
-
- this.caughtException = null;
-
- try
- {
- code();
- }
- catch (Exception ex)
- {
- this.caughtException = ex;
- }
-
- if (this.caughtException == null)
- return false;
-
- return baseConstraint == null || baseConstraint.Matches(caughtException);
- }
-
-#if CLR_2_0 || CLR_4_0
- /// <summary>
- /// Converts an ActualValueDelegate to a TestDelegate
- /// before calling the primary overload.
- /// </summary>
- /// <param name="del"></param>
- /// <returns></returns>
- public override bool Matches(ActualValueDelegate del)
- {
- TestDelegate testDelegate = new TestDelegate(delegate { del(); });
- return Matches((object)testDelegate);
- }
-#endif
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- if (baseConstraint == null)
- writer.WritePredicate("an exception");
- else
- baseConstraint.WriteDescriptionTo(writer);
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a
- /// MessageWriter. The default implementation simply writes
- /// the raw value of actual, leaving it to the writer to
- /// perform any formatting.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- if (caughtException == null)
- writer.Write("no exception thrown");
- else if (baseConstraint != null)
- baseConstraint.WriteActualValueTo(writer);
- else
- writer.WriteActualValue(caughtException);
- }
- #endregion
-
- /// <summary>
- /// Returns the string representation of this constraint
- /// </summary>
- protected override string GetStringRepresentation()
- {
- if (baseConstraint == null)
- return "<throws>";
-
- return base.GetStringRepresentation();
- }
- }
- #endregion
-
- #region ThrowsNothingConstraint
- /// <summary>
- /// ThrowsNothingConstraint tests that a delegate does not
- /// throw an exception.
- /// </summary>
- public class ThrowsNothingConstraint : Constraint
- {
- private Exception caughtException;
-
- /// <summary>
- /// Test whether the constraint is satisfied by a given value
- /// </summary>
- /// <param name="actual">The value to be tested</param>
- /// <returns>True if no exception is thrown, otherwise false</returns>
- public override bool Matches(object actual)
- {
- TestDelegate code = actual as TestDelegate;
- if (code == null)
- throw new ArgumentException("The actual value must be a TestDelegate", "actual");
-
- this.caughtException = null;
-
- try
- {
- code();
- }
- catch (Exception ex)
- {
- this.caughtException = ex;
- }
-
- return this.caughtException == null;
- }
-
- /// <summary>
- /// Write the constraint description to a MessageWriter
- /// </summary>
- /// <param name="writer">The writer on which the description is displayed</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.Write(string.Format("No Exception to be thrown"));
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a
- /// MessageWriter. The default implementation simply writes
- /// the raw value of actual, leaving it to the writer to
- /// perform any formatting.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- writer.WriteActualValue( this.caughtException.GetType() );
- }
- }
- #endregion
-}
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ThrowsConstraint is used to test the exception thrown by
+ /// a delegate by applying a constraint to it.
+ /// </summary>
+ public class ThrowsConstraint : PrefixConstraint
+ {
+ private Exception caughtException;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ThrowsConstraint"/> class,
+ /// using a constraint to be applied to the exception.
+ /// </summary>
+ /// <param name="baseConstraint">A constraint to apply to the caught exception.</param>
+ public ThrowsConstraint(Constraint baseConstraint)
+ : base(baseConstraint) { }
+
+ /// <summary>
+ /// Get the actual exception thrown - used by Assert.Throws.
+ /// </summary>
+ public Exception ActualException
+ {
+ get { return caughtException; }
+ }
+
+ #region Constraint Overrides
+ /// <summary>
+ /// Executes the code of the delegate and captures any exception.
+ /// If a non-null base constraint was provided, it applies that
+ /// constraint to the exception.
+ /// </summary>
+ /// <param name="actual">A delegate representing the code to be tested</param>
+ /// <returns>True if an exception is thrown and the constraint succeeds, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ TestDelegate code = actual as TestDelegate;
+ if (code == null)
+ throw new ArgumentException(
+ string.Format("The actual value must be a TestDelegate but was {0}", actual.GetType().Name), "actual");
+
+ this.caughtException = null;
+
+ try
+ {
+ code();
+ }
+ catch (Exception ex)
+ {
+ this.caughtException = ex;
+ }
+
+ if (this.caughtException == null)
+ return false;
+
+ return baseConstraint == null || baseConstraint.Matches(caughtException);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Converts an ActualValueDelegate to a TestDelegate
+ /// before calling the primary overload.
+ /// </summary>
+ /// <param name="del"></param>
+ /// <returns></returns>
+ public override bool Matches(ActualValueDelegate del)
+ {
+ TestDelegate testDelegate = new TestDelegate(delegate { del(); });
+ return Matches((object)testDelegate);
+ }
+#endif
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ if (baseConstraint == null)
+ writer.WritePredicate("an exception");
+ else
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ if (caughtException == null)
+ writer.Write("no exception thrown");
+ else if (baseConstraint != null)
+ baseConstraint.WriteActualValueTo(writer);
+ else
+ writer.WriteActualValue(caughtException);
+ }
+ #endregion
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ if (baseConstraint == null)
+ return "<throws>";
+
+ return base.GetStringRepresentation();
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/ThrowsNothingConstraint.cs'
--- src/framework/Constraints/ThrowsNothingConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ThrowsNothingConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,82 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ThrowsNothingConstraint tests that a delegate does not
+ /// throw an exception.
+ /// </summary>
+ public class ThrowsNothingConstraint : Constraint
+ {
+ private Exception caughtException;
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True if no exception is thrown, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ TestDelegate code = actual as TestDelegate;
+ if (code == null)
+ throw new ArgumentException("The actual value must be a TestDelegate", "actual");
+
+ this.caughtException = null;
+
+ try
+ {
+ code();
+ }
+ catch (Exception ex)
+ {
+ this.caughtException = ex;
+ }
+
+ return this.caughtException == null;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write(string.Format("No Exception to be thrown"));
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(this.caughtException.GetType());
+ }
+ }
+}
=== added file 'src/framework/Constraints/ThrowsOperator.cs'
--- src/framework/Constraints/ThrowsOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ThrowsOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that tests that an exception is thrown and
+ /// optionally applies further tests to the exception.
+ /// </summary>
+ public class ThrowsOperator : SelfResolvingOperator
+ {
+ /// <summary>
+ /// Construct a ThrowsOperator
+ /// </summary>
+ public ThrowsOperator()
+ {
+ // ThrowsOperator stacks on everything but
+ // it's always the first item on the stack
+ // anyway. It is evaluated last of all ops.
+ this.left_precedence = 1;
+ this.right_precedence = 100;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new ThrowsConstraint(null));
+ else
+ stack.Push(new ThrowsConstraint(stack.Pop()));
+ }
+ }
+}
\ No newline at end of file
=== modified file 'src/framework/Constraints/Tolerance.cs'
--- src/framework/Constraints/Tolerance.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/Tolerance.cs 2010-09-20 20:37:41 +0000
@@ -26,36 +26,6 @@
namespace NUnit.Framework.Constraints
{
/// <summary>
- /// Modes in which the tolerance value for a comparison can
- /// be interpreted.
- /// </summary>
- public enum ToleranceMode
- {
- /// <summary>
- /// The tolerance was created with a value, without specifying
- /// how the value would be used. This is used to prevent setting
- /// the mode more than once and is generally changed to Linear
- /// upon execution of the test.
- /// </summary>
- None,
- /// <summary>
- /// The tolerance is used as a numeric range within which
- /// two compared values are considered to be equal.
- /// </summary>
- Linear,
- /// <summary>
- /// Interprets the tolerance as the percentage by which
- /// the two compared values my deviate from each other.
- /// </summary>
- Percent,
- /// <summary>
- /// Compares two values based in their distance in
- /// representable numbers.
- /// </summary>
- Ulps
- }
-
- /// <summary>
/// The Tolerance class generalizes the notion of a tolerance
/// within which an equality test succeeds. Normally, it is
/// used with numeric types, but it can be used with any
@@ -64,15 +34,12 @@
/// </summary>
public class Tolerance
{
- private ToleranceMode mode;
- private object amount;
+ private readonly ToleranceMode mode;
+ private readonly object amount;
- private static readonly string ModeMustFollowTolerance =
- "Tolerance amount must be specified before setting mode";
- private static readonly string MultipleToleranceModes =
- "Tried to use multiple tolerance modes at the same time";
- private static readonly string NumericToleranceRequired =
- "A numeric tolerance is required";
+ private const string ModeMustFollowTolerance = "Tolerance amount must be specified before setting mode";
+ private const string MultipleToleranceModes = "Tried to use multiple tolerance modes at the same time";
+ private const string NumericToleranceRequired = "A numeric tolerance is required";
/// <summary>
/// Returns an empty Tolerance object, equivalent to
=== added file 'src/framework/Constraints/ToleranceMode.cs'
--- src/framework/Constraints/ToleranceMode.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/ToleranceMode.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+/// <summary>
+/// Modes in which the tolerance value for a comparison can be interpreted.
+/// </summary>
+public enum ToleranceMode
+{
+ /// <summary>
+ /// The tolerance was created with a value, without specifying
+ /// how the value would be used. This is used to prevent setting
+ /// the mode more than once and is generally changed to Linear
+ /// upon execution of the test.
+ /// </summary>
+ None,
+ /// <summary>
+ /// The tolerance is used as a numeric range within which
+ /// two compared values are considered to be equal.
+ /// </summary>
+ Linear,
+ /// <summary>
+ /// Interprets the tolerance as the percentage by which
+ /// the two compared values my deviate from each other.
+ /// </summary>
+ Percent,
+ /// <summary>
+ /// Compares two values based in their distance in
+ /// representable numbers.
+ /// </summary>
+ Ulps
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/TrueConstraint.cs'
--- src/framework/Constraints/TrueConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/TrueConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// TrueConstraint tests that the actual value is true
+ /// </summary>
+ public class TrueConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TrueConstraint"/> class.
+ /// </summary>
+ public TrueConstraint() : base(true, "True") { }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/TypeConstraint.cs'
--- src/framework/Constraints/TypeConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/TypeConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// TypeConstraint is the abstract base for constraints
+ /// that take a Type as their expected value.
+ /// </summary>
+ public abstract class TypeConstraint : Constraint
+ {
+ /// <summary>
+ /// The expected Type used by the constraint
+ /// </summary>
+ protected Type expectedType;
+
+ /// <summary>
+ /// Construct a TypeConstraint for a given Type
+ /// </summary>
+ /// <param name="type"></param>
+ protected TypeConstraint(Type type)
+ : base(type)
+ {
+ this.expectedType = type;
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. TypeConstraints override this method to write
+ /// the name of the type.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(actual == null ? null : actual.GetType());
+ }
+ }
+}
\ No newline at end of file
=== removed file 'src/framework/Constraints/TypeConstraints.cs'
--- src/framework/Constraints/TypeConstraints.cs 2009-10-28 22:51:26 +0000
+++ src/framework/Constraints/TypeConstraints.cs 1970-01-01 00:00:00 +0000
@@ -1,200 +0,0 @@
-// ***********************************************************************
-// Copyright (c) 2007 Charlie Poole
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-// ***********************************************************************
-
-using System;
-
-namespace NUnit.Framework.Constraints
-{
- /// <summary>
- /// TypeConstraint is the abstract base for constraints
- /// that take a Type as their expected value.
- /// </summary>
- public abstract class TypeConstraint : Constraint
- {
- /// <summary>
- /// The expected Type used by the constraint
- /// </summary>
- protected Type expectedType;
-
- /// <summary>
- /// Construct a TypeConstraint for a given Type
- /// </summary>
- /// <param name="type"></param>
- public TypeConstraint(Type type) : base(type)
- {
- this.expectedType = type;
- }
-
- /// <summary>
- /// Write the actual value for a failing constraint test to a
- /// MessageWriter. TypeConstraints override this method to write
- /// the name of the type.
- /// </summary>
- /// <param name="writer">The writer on which the actual value is displayed</param>
- public override void WriteActualValueTo(MessageWriter writer)
- {
- writer.WriteActualValue( actual == null ? null : actual.GetType() );
- }
- }
-
- /// <summary>
- /// ExactTypeConstraint is used to test that an object
- /// is of the exact type provided in the constructor
- /// </summary>
- public class ExactTypeConstraint : TypeConstraint
- {
- /// <summary>
- /// Construct an ExactTypeConstraint for a given Type
- /// </summary>
- /// <param name="type">The expected Type.</param>
- public ExactTypeConstraint(Type type) : base( type )
- {
- this.DisplayName = "typeof";
- }
-
- /// <summary>
- /// Test that an object is of the exact type specified
- /// </summary>
- /// <param name="actual">The actual value.</param>
- /// <returns>True if the tested object is of the exact type provided, otherwise false.</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return actual != null && actual.GetType() == this.expectedType;
- }
-
- /// <summary>
- /// Write the description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to use</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WriteExpectedValue(expectedType);
- }
- }
-
- /// <summary>
- /// InstanceOfTypeConstraint is used to test that an object
- /// is of the same type provided or derived from it.
- /// </summary>
- public class InstanceOfTypeConstraint : TypeConstraint
- {
- /// <summary>
- /// Construct an InstanceOfTypeConstraint for the type provided
- /// </summary>
- /// <param name="type">The expected Type</param>
- public InstanceOfTypeConstraint(Type type) : base(type)
- {
- this.DisplayName = "instanceof";
- }
-
- /// <summary>
- /// Test whether an object is of the specified type or a derived type
- /// </summary>
- /// <param name="actual">The object to be tested</param>
- /// <returns>True if the object is of the provided type or derives from it, otherwise false.</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return actual != null && expectedType.IsInstanceOfType(actual);
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to use</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("instance of");
- writer.WriteExpectedValue(expectedType);
- }
- }
-
- /// <summary>
- /// AssignableFromConstraint is used to test that an object
- /// can be assigned from a given Type.
- /// </summary>
- public class AssignableFromConstraint : TypeConstraint
- {
- /// <summary>
- /// Construct an AssignableFromConstraint for the type provided
- /// </summary>
- /// <param name="type"></param>
- public AssignableFromConstraint(Type type) : base(type) { }
-
- /// <summary>
- /// Test whether an object can be assigned from the specified type
- /// </summary>
- /// <param name="actual">The object to be tested</param>
- /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return actual != null && actual.GetType().IsAssignableFrom(expectedType);
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to use</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("assignable from");
- writer.WriteExpectedValue(expectedType);
- }
- }
-
- /// <summary>
- /// AssignableToConstraint is used to test that an object
- /// can be assigned to a given Type.
- /// </summary>
- public class AssignableToConstraint : TypeConstraint
- {
- /// <summary>
- /// Construct an AssignableToConstraint for the type provided
- /// </summary>
- /// <param name="type"></param>
- public AssignableToConstraint(Type type) : base(type) { }
-
- /// <summary>
- /// Test whether an object can be assigned to the specified type
- /// </summary>
- /// <param name="actual">The object to be tested</param>
- /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
- public override bool Matches(object actual)
- {
- this.actual = actual;
- return actual != null && expectedType.IsAssignableFrom(actual.GetType());
- }
-
- /// <summary>
- /// Write a description of this constraint to a MessageWriter
- /// </summary>
- /// <param name="writer">The MessageWriter to use</param>
- public override void WriteDescriptionTo(MessageWriter writer)
- {
- writer.WritePredicate("assignable to");
- writer.WriteExpectedValue(expectedType);
- }
- }
-}
=== added file 'src/framework/Constraints/UniqueItemsConstraint.cs'
--- src/framework/Constraints/UniqueItemsConstraint.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/UniqueItemsConstraint.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,63 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// UniqueItemsConstraint tests whether all the items in a
+ /// collection are unique.
+ /// </summary>
+ public class UniqueItemsConstraint : CollectionItemsEqualConstraint
+ {
+ /// <summary>
+ /// Check that all items are unique.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ ObjectList list = new ObjectList();
+
+ foreach (object o1 in actual)
+ {
+ foreach (object o2 in list)
+ if (ItemsEqual(o1, o2))
+ return false;
+ list.Add(o1);
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("all items unique");
+ }
+ }
+}
\ No newline at end of file
=== added file 'src/framework/Constraints/WithOperator.cs'
--- src/framework/Constraints/WithOperator.cs 1970-01-01 00:00:00 +0000
+++ src/framework/Constraints/WithOperator.cs 2010-09-20 20:37:41 +0000
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that simply wraps the
+ /// constraint provided as an argument, without any
+ /// further functionality, but which modifes the
+ /// order of evaluation because of its precedence.
+ /// </summary>
+ public class WithOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructor for the WithOperator
+ /// </summary>
+ public WithOperator()
+ {
+ this.left_precedence = 1;
+ this.right_precedence = 4;
+ }
+
+ /// <summary>
+ /// Returns a constraint that wraps its argument
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return constraint;
+ }
+ }
+}
\ No newline at end of file