This list is closed, nobody may subscribe to it.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(99) |
Feb
(163) |
Mar
(3) |
Apr
(33) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
|
Jun
(16) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:49
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Examples Modified Files: DotNetMock.Examples.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Examples.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/DotNetMock.Examples.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DotNetMock.Examples.csproj 9 Feb 2005 06:34:27 -0000 1.9 --- DotNetMock.Examples.csproj 6 Jun 2006 03:06:51 -0000 1.10 *************** *** 1,170 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{80B98B32-57CB-4989-B506-0F2B0AD94DBA}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Examples" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Examples" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "true" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "CustomExpectation\ExpectationPerson.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "CustomExpectation\Person.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\DefaultWeatherRandom.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IWeatherRandom.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Weather.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\DatabaseConstants.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\IListAction.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\MailingList.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\MailingListException.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\MockListAction.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\CustomerNumberCollector.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\IMainframeConnection.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\MainframeConnection.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\MockMainframeConnection.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\SensitiveClass.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,146 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{80B98B32-57CB-4989-B506-0F2B0AD94DBA}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Examples</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Examples</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="CustomExpectation\ExpectationPerson.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="CustomExpectation\Person.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\DefaultWeatherRandom.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IWeatherRandom.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Weather.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\DatabaseConstants.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\IListAction.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\MailingList.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\MailingListException.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\MockListAction.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\CustomerNumberCollector.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\IMainframeConnection.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\MainframeConnection.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\MockMainframeConnection.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\SensitiveClass.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:37
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076 Modified Files: DotNetMock.sln Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.sln =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.sln,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** DotNetMock.sln 11 Feb 2005 05:46:40 -0000 1.20 --- DotNetMock.sln 6 Jun 2006 03:06:52 -0000 1.21 *************** *** 1,80 **** ! Microsoft Visual Studio Solution File, Format Version 8.00 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Framework", "DotNetMock.Framework\DotNetMock.Framework.csproj", "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Framework.Tests", "DotNetMock.Framework.Tests\DotNetMock.Framework.Tests.csproj", "{32FE638B-E5ED-4886-8F1B-5E35AE6289A5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock", "DotNetMock\DotNetMock.csproj", "{1AD0CD00-16FA-4456-B2ED-A47406957228}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Tests", "DotNetMock.Tests\DotNetMock.Tests.csproj", "{0FBE418F-86AF-4E83-B66F-C0177CE582BC}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples", "DotNetMock.Examples\DotNetMock.Examples.csproj", "{80B98B32-57CB-4989-B506-0F2B0AD94DBA}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.TestFramework.Tests", "DotNetMock.TestFramework.Tests\DotNetMock.TestFramework.Tests.csproj", "{6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples.NUnitTests", "DotNetMock.Examples.NUnitTests\DotNetMock.Examples.NUnitTests.csproj", "{760B53F4-0E0F-41A0-94ED-9B8691833A70}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples.MbUnitTests", "DotNetMock.Examples.MbUnitTests\DotNetMock.Examples.MbUnitTests.csproj", "{EE85D1DF-A4EC-457F-8409-4A33E823B5D8}" ! ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global ! GlobalSection(SolutionConfiguration) = preSolution ! Debug = Debug ! Release = Release ! EndGlobalSection ! GlobalSection(ProjectConfiguration) = postSolution ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Debug.ActiveCfg = Debug|.NET ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Debug.Build.0 = Debug|.NET ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Release.ActiveCfg = Release|.NET ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Release.Build.0 = Release|.NET ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Debug.ActiveCfg = Debug|.NET ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Debug.Build.0 = Debug|.NET ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Release.ActiveCfg = Release|.NET ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Release.Build.0 = Release|.NET ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Debug.ActiveCfg = Debug|.NET ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Debug.Build.0 = Debug|.NET ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Release.ActiveCfg = Release|.NET ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Release.Build.0 = Release|.NET ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Debug.ActiveCfg = Debug|.NET ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Debug.Build.0 = Debug|.NET ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Release.ActiveCfg = Release|.NET ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Release.Build.0 = Release|.NET ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Debug.ActiveCfg = Debug|.NET ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Debug.Build.0 = Debug|.NET ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Release.ActiveCfg = Release|.NET ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Release.Build.0 = Release|.NET ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Debug.ActiveCfg = Debug|.NET ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Debug.Build.0 = Debug|.NET ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Release.ActiveCfg = Release|.NET ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Release.Build.0 = Release|.NET ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Debug.ActiveCfg = Debug|.NET ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Debug.Build.0 = Debug|.NET ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Release.ActiveCfg = Release|.NET ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Release.Build.0 = Release|.NET ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Debug.ActiveCfg = Debug|.NET ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Debug.Build.0 = Debug|.NET ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Release.ActiveCfg = Release|.NET ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Release.Build.0 = Release|.NET ! EndGlobalSection ! GlobalSection(SolutionItems) = postSolution ! DotNetMock.build = DotNetMock.build EndGlobalSection ! GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection ! GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal --- 1,66 ---- ! Microsoft Visual Studio Solution File, Format Version 9.00 ! # Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Framework", "DotNetMock.Framework\DotNetMock.Framework.csproj", "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Framework.Tests", "DotNetMock.Framework.Tests\DotNetMock.Framework.Tests.csproj", "{32FE638B-E5ED-4886-8F1B-5E35AE6289A5}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock", "DotNetMock\DotNetMock.csproj", "{1AD0CD00-16FA-4456-B2ED-A47406957228}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Tests", "DotNetMock.Tests\DotNetMock.Tests.csproj", "{0FBE418F-86AF-4E83-B66F-C0177CE582BC}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples", "DotNetMock.Examples\DotNetMock.Examples.csproj", "{80B98B32-57CB-4989-B506-0F2B0AD94DBA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.TestFramework.Tests", "DotNetMock.TestFramework.Tests\DotNetMock.TestFramework.Tests.csproj", "{6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples.NUnitTests", "DotNetMock.Examples.NUnitTests\DotNetMock.Examples.NUnitTests.csproj", "{760B53F4-0E0F-41A0-94ED-9B8691833A70}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMock.Examples.MbUnitTests", "DotNetMock.Examples.MbUnitTests\DotNetMock.Examples.MbUnitTests.csproj", "{EE85D1DF-A4EC-457F-8409-4A33E823B5D8}" ! EndProject ! Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{69DFF025-2B6B-467F-95EF-02B1FCBEEB09}" ! ProjectSection(SolutionItems) = preProject ! DotNetMock.build = DotNetMock.build EndProjectSection EndProject Global ! GlobalSection(SolutionConfigurationPlatforms) = preSolution ! Debug|Any CPU = Debug|Any CPU ! Release|Any CPU = Release|Any CPU EndGlobalSection ! GlobalSection(ProjectConfigurationPlatforms) = postSolution ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {514DAB7F-4A05-4343-9BF5-2C3DC60A431D}.Release|Any CPU.Build.0 = Release|Any CPU ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {32FE638B-E5ED-4886-8F1B-5E35AE6289A5}.Release|Any CPU.Build.0 = Release|Any CPU ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {1AD0CD00-16FA-4456-B2ED-A47406957228}.Release|Any CPU.Build.0 = Release|Any CPU ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {0FBE418F-86AF-4E83-B66F-C0177CE582BC}.Release|Any CPU.Build.0 = Release|Any CPU ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {80B98B32-57CB-4989-B506-0F2B0AD94DBA}.Release|Any CPU.Build.0 = Release|Any CPU ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}.Release|Any CPU.Build.0 = Release|Any CPU ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {760B53F4-0E0F-41A0-94ED-9B8691833A70}.Release|Any CPU.Build.0 = Release|Any CPU ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Debug|Any CPU.Build.0 = Debug|Any CPU ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Release|Any CPU.ActiveCfg = Release|Any CPU ! {EE85D1DF-A4EC-457F-8409-4A33E823B5D8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection ! GlobalSection(SolutionProperties) = preSolution ! HideSolutionNode = FALSE EndGlobalSection EndGlobal |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:32
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock/Dynamic Modified Files: ExpectationMethod.cs IMethodCallExpectation.cs MethodCall.cs MethodSignature.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: MethodCall.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/MethodCall.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MethodCall.cs 11 May 2005 05:42:24 -0000 1.6 --- MethodCall.cs 6 Jun 2006 03:06:52 -0000 1.7 *************** *** 1,177 **** #region License // Copyright (c) 2004 Griffin Caprio, Roman V. Gavrilov & Choy Rim. All rights reserved. #endregion #region Imports using System; using System.Reflection; #endregion namespace DotNetMock.Dynamic { ! /// <summary> ! /// Method call. ! /// </summary> ! /// <author>Roman V. Gavrilov</author> ! /// <author>Choy Rim</author> ! public class MethodCall ! { ! #region Private Instance Fields ! private MethodInfo _method; ! private object[] _arguments; ! #endregion ! /// <summary> ! /// Create new method call instance. ! /// </summary> ! /// <param name="method"> ! /// <see cref="MethodInfo"/> of method called ! /// </param> ! /// <param name="arguments">Arguments of the method call.</param> ! public MethodCall(MethodInfo method, params object[] arguments) ! { ! if (arguments == null) ! { ! arguments = new object[0]; ! } ! int expectedArgumentCount = method.GetParameters().Length; ! if (expectedArgumentCount != arguments.Length) ! { ! throw new InvalidOperationException(String.Format( ! "Method {0} takes {1} arguments but received {2}.", ! method.Name, ! expectedArgumentCount, ! arguments.Length ! )); ! } ! _method = method; ! _arguments = arguments; ! } ! /// <summary> ! /// Name of method or property. ! /// </summary> ! /// <remarks> ! /// In the case of a property, we strip the "get_" or "set_" ! /// prefix. ! /// </remarks> ! public string MethodName ! { ! get ! { ! string name = _method.Name; ! if ( IsPropertyAccess ) ! { ! return name.Substring(4); ! } ! return name; ! } ! } ! /// <summary> ! /// Are we accessing a property or calling a typical method? ! /// </summary> ! public bool IsPropertyAccess ! { ! get ! { ! if ( ! _method.IsSpecialName ) ! { ! return false; ! } ! string name = _method.Name; ! return name.StartsWith("get_") || name.StartsWith("set_"); ! } ! } ! /// <summary> ! /// Check if given and this object represent the same method call. ! /// </summary> ! public override bool Equals(object obj) ! { ! MethodCall that = obj as MethodCall; ! if ( object.ReferenceEquals(that, null) ) ! { ! return false; ! } ! if ( that.Method!=this.Method ) ! { ! return false; ! } ! if (that.Arguments.Length != this.Arguments.Length) ! { ! return false; ! } ! for (int i = 0; i < that.Arguments.Length; ++i) ! { ! if (!that.Arguments[i].Equals(this.Arguments[i])) return false; ! } ! return true; ! } ! /// <summary> ! /// Get object's hash code. ! /// </summary> ! /// <returns>Object's hash code.</returns> ! public override int GetHashCode() ! { ! int hashCode = Method.GetHashCode(); ! foreach (object argument in Arguments) ! { ! hashCode ^= argument.GetHashCode(); ! } ! return hashCode; ! } ! /// <summary> ! /// String representation of method call. ! /// </summary> ! /// <returns> ! /// String of the form: ! /// <i>method-name</i>(<i>argument-name</i>=<i>argument-value</i>, ...) ! /// </returns> ! public override string ToString() ! { ! ParameterInfo[] pis = Method.GetParameters(); ! string[] argumentTexts = new string[Arguments.Length]; ! for ( int i = 0; i<Arguments.Length; ++i ) ! { ! object argument = Arguments[i]; ! string argumentName = pis[i].Name; ! string argumentValue; ! if ( object.ReferenceEquals(argument, null) ) ! { ! argumentValue = "null"; ! } ! else if( argument is string ) ! { ! argumentValue = "\""+argument.ToString()+"\""; ! } ! else ! { ! try ! { ! argumentValue = argument.ToString(); ! } ! catch ! { ! argumentValue = "N/A"; ! } ! } ! argumentTexts[i] = String.Format( ! "{0}={1}", ! argumentName, ! argumentValue ! ); ! } ! return String.Format( ! "{0}({1})", ! Method.Name, ! String.Join(", ", argumentTexts) ! ); ! } ! /// <summary> ! /// <see cref="MethodInfo"/> of method in method call. ! /// </summary> ! public MethodInfo Method { get { return _method; } } ! /// <summary> ! /// Array of all argument values for method call. ! /// </summary> ! public object[] Arguments { get { return _arguments; } } ! } ! } --- 1,196 ---- #region License + // Copyright (c) 2004 Griffin Caprio, Roman V. Gavrilov & Choy Rim. All rights reserved. + #endregion + #region Imports + using System; using System.Reflection; + #endregion namespace DotNetMock.Dynamic { ! /// <summary> ! /// Method call. ! /// </summary> ! /// <author>Roman V. Gavrilov</author> ! /// <author>Choy Rim</author> ! public class MethodCall ! { ! #region Private Instance Fields ! private MethodInfo _method; ! private object[] _arguments; ! #endregion ! ! /// <summary> ! /// Create new method call instance. ! /// </summary> ! /// <param name="method"> ! /// <see cref="MethodInfo"/> of method called ! /// </param> ! /// <param name="arguments">Arguments of the method call.</param> ! public MethodCall(MethodInfo method, params object[] arguments) ! { ! if (arguments == null) ! { ! arguments = new object[0]; ! } ! int expectedArgumentCount = method.GetParameters().Length; ! if (expectedArgumentCount != arguments.Length) ! { ! throw new InvalidOperationException(String.Format( ! "Method {0} takes {1} arguments but received {2}.", ! method.Name, ! expectedArgumentCount, ! arguments.Length ! )); ! } ! _method = method; ! _arguments = arguments; ! } ! ! /// <summary> ! /// Name of method or property. ! /// </summary> ! /// <remarks> ! /// In the case of a property, we strip the "get_" or "set_" ! /// prefix. ! /// </remarks> ! public string MethodName ! { ! get ! { ! string name = _method.Name; ! if (IsPropertyAccess) ! { ! return name.Substring(4); ! } ! return name; ! } ! } ! ! /// <summary> ! /// Are we accessing a property or calling a typical method? ! /// </summary> ! public bool IsPropertyAccess ! { ! get ! { ! if (! _method.IsSpecialName) ! { ! return false; ! } ! string name = _method.Name; ! return name.StartsWith("get_") || name.StartsWith("set_"); ! } ! } ! ! /// <summary> ! /// Check if given and this object represent the same method call. ! /// </summary> ! public override bool Equals(object obj) ! { ! MethodCall that = obj as MethodCall; ! if (ReferenceEquals(that, null)) ! { ! return false; ! } ! if (that.Method != Method) ! { ! return false; ! } ! if (that.Arguments.Length != Arguments.Length) ! { ! return false; ! } ! for (int i = 0; i < that.Arguments.Length; ++i) ! { ! if (!that.Arguments[i].Equals(Arguments[i])) return false; ! } ! return true; ! } ! ! /// <summary> ! /// Get object's hash code. ! /// </summary> ! /// <returns>Object's hash code.</returns> ! public override int GetHashCode() ! { ! int hashCode = Method.GetHashCode(); ! foreach (object argument in Arguments) ! { ! hashCode ^= argument.GetHashCode(); ! } ! return hashCode; ! } ! ! /// <summary> ! /// String representation of method call. ! /// </summary> ! /// <returns> ! /// String of the form: ! /// <i>method-name</i>(<i>argument-name</i>=<i>argument-value</i>, ...) ! /// </returns> ! public override string ToString() ! { ! ParameterInfo[] pis = Method.GetParameters(); ! string[] argumentTexts = new string[Arguments.Length]; ! for (int i = 0; i < Arguments.Length; ++i) ! { ! object argument = Arguments[i]; ! string argumentName = pis[i].Name; ! string argumentValue; ! if (ReferenceEquals(argument, null)) ! { ! argumentValue = "null"; ! } ! else if (argument is string) ! { ! argumentValue = "\"" + argument.ToString() + "\""; ! } ! else ! { ! try ! { ! argumentValue = argument.ToString(); ! } ! catch ! { ! argumentValue = "N/A"; ! } ! } ! argumentTexts[i] = String.Format( ! "{0}={1}", ! argumentName, ! argumentValue ! ); ! } ! return String.Format( ! "{0}({1})", ! Method.Name, ! String.Join(", ", argumentTexts) ! ); ! } ! ! /// <summary> ! /// <see cref="MethodInfo"/> of method in method call. ! /// </summary> ! public MethodInfo Method ! { ! get { return _method; } ! } ! ! /// <summary> ! /// Array of all argument values for method call. ! /// </summary> ! public object[] Arguments ! { ! get { return _arguments; } ! } ! } ! } \ No newline at end of file Index: IMethodCallExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/IMethodCallExpectation.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IMethodCallExpectation.cs 6 Mar 2006 02:24:58 -0000 1.3 --- IMethodCallExpectation.cs 6 Jun 2006 03:06:52 -0000 1.4 *************** *** 1,20 **** #region License // Copyright (c) 2005 Choy Rim. All rights reserved. ! #endregion ! #region Imports ! using System; #endregion namespace DotNetMock.Dynamic { ! /// <summary> ! /// Interface for expectations on method calls.. ! /// </summary> ! public interface IMethodCallExpectation ! { ! /// <summary> ! /// Expected method name. ! /// </summary> ! string ExpectedMethodName { get; } /// <summary> --- 1,19 ---- #region License + // Copyright (c) 2005 Choy Rim. All rights reserved. ! #endregion namespace DotNetMock.Dynamic { ! /// <summary> ! /// Interface for expectations on method calls.. ! /// </summary> ! public interface IMethodCallExpectation ! { ! /// <summary> ! /// Expected method name. ! /// </summary> ! string ExpectedMethodName { get; } /// <summary> *************** *** 22,36 **** /// </summary> ExpectationMethodType ExpectationType { get; } ! ! /// <summary> ! /// Check actual incoming method call and return expected outgoing response. ! /// </summary> ! /// <param name="call">incoming call</param> ! /// <returns>expected return value</returns> ! /// <remarks> ! /// The outgoing response may be an exception or the modification ! /// of ref/out parameters. ! /// </remarks> ! object CheckCallAndSendResponse(MethodCall call); ! } ! } --- 21,35 ---- /// </summary> ExpectationMethodType ExpectationType { get; } ! ! /// <summary> ! /// Check actual incoming method call and return expected outgoing response. ! /// </summary> ! /// <param name="call">incoming call</param> ! /// <returns>expected return value</returns> ! /// <remarks> ! /// The outgoing response may be an exception or the modification ! /// of ref/out parameters. ! /// </remarks> ! object CheckCallAndSendResponse(MethodCall call); ! } ! } \ No newline at end of file Index: MethodSignature.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/MethodSignature.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MethodSignature.cs 23 Apr 2005 21:53:33 -0000 1.2 --- MethodSignature.cs 6 Jun 2006 03:06:52 -0000 1.3 *************** *** 1,143 **** using System; using System.Reflection; namespace DotNetMock.Dynamic { ! /// <summary> ! /// Class encapsulates a method signature of a single method. ! /// </summary> ! /// <author>Roman V. Gavrilov</author> ! /// <author>Griffin Caprio</author> ! public class MethodSignature ! { ! private Type[] _paramTypes; ! private string _methodName; ! private Type _returnType; ! #region Constructors ! /// <summary> ! /// Create new instance based on given information. ! /// </summary> ! /// <param name="methodName">Name of the method.</param> ! /// <param name="returnType">Method return type.</param> ! /// <param name="paramTypes">Parameter types.</param> ! public MethodSignature( string methodName, Type returnType, params Type[] paramTypes ) ! { ! _methodName = methodName; ! _returnType = returnType; ! _paramTypes = ( Type[] )paramTypes.Clone( ); ! } ! /// <summary> ! /// Create new instance of method signature from MethodInfo. ! /// </summary> ! /// <param name="methodInfo">MethodInfo to use for method signature instantiation.</param> ! public MethodSignature( MethodInfo methodInfo ) ! { ! ParameterInfo[] paramInfos = methodInfo.GetParameters( ); ! Type[] paramTypes = new Type[paramInfos.Length]; ! foreach ( ParameterInfo paramInfo in paramInfos ) ! { ! paramTypes[ paramInfo.Position ] = paramInfo.ParameterType; ! } ! _methodName = methodInfo.Name; ! _returnType = methodInfo.ReturnType; ! _paramTypes = paramTypes; ! } ! #endregion ! #region Public Properties ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s parameter types. ! /// </summary> ! public Type[] ParamTypes ! { ! get ! { ! return _paramTypes; ! } ! } ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s method name. ! /// </summary> ! public string MethodName ! { ! get ! { ! return _methodName; ! } ! } ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s return type. ! /// </summary> ! public Type ReturnType ! { ! get ! { ! return _returnType; ! } ! } ! #endregion ! /// <summary> ! /// Compare two signatures by content. ! /// </summary> ! public override bool Equals( object obj ) ! { ! if ( obj == null ) ! { ! return false; ! } ! if ( !( obj is MethodSignature ) ) ! { ! return false; ! } ! MethodSignature that = ( MethodSignature )obj; ! if ( that.MethodName.CompareTo( this.MethodName ) != 0 ) ! { ! return false; ! } ! if ( !that.ReturnType.Equals( this.ReturnType ) ) ! { ! return false; ! } ! if ( that.ParamTypes.Length != this.ParamTypes.Length ) ! { ! return false; ! } ! for ( int idx = 0; idx < that.ParamTypes.Length; ++idx ) ! { ! if ( !that.ParamTypes[ idx ].Equals( this.ParamTypes[ idx ] ) ) ! { ! return false; ! } ! } ! return true; ! } ! /// <summary> ! /// Returns string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/> ! /// </summary> ! /// <returns>string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/></returns> ! public override string ToString( ) ! { ! string paramTypesString = null; ! foreach ( Type paramType in _paramTypes ) ! { ! if ( paramTypesString != null ) ! { ! paramTypesString += ", "; ! } ! paramTypesString += paramType.ToString( ); ! } ! string str = string.Format( "{0} {1}({2})", _returnType.ToString( ), _methodName, paramTypesString ); ! return str; ! } ! /// <summary> ! /// Returns hashcode of base class ! /// </summary> ! /// <returns></returns> ! public override int GetHashCode( ) ! { ! return base.GetHashCode( ); ! } ! } } \ No newline at end of file --- 1,134 ---- using System; using System.Reflection; + namespace DotNetMock.Dynamic { ! /// <summary> ! /// Class encapsulates a method signature of a single method. ! /// </summary> ! /// <author>Roman V. Gavrilov</author> ! /// <author>Griffin Caprio</author> ! public class MethodSignature ! { ! private Type[] _paramTypes; ! private string _methodName; ! private Type _returnType; ! #region Constructors ! /// <summary> ! /// Create new instance based on given information. ! /// </summary> ! /// <param name="methodName">Name of the method.</param> ! /// <param name="returnType">Method return type.</param> ! /// <param name="paramTypes">Parameter types.</param> ! public MethodSignature(string methodName, Type returnType, params Type[] paramTypes) ! { ! _methodName = methodName; ! _returnType = returnType; ! _paramTypes = (Type[]) paramTypes.Clone(); ! } ! /// <summary> ! /// Create new instance of method signature from MethodInfo. ! /// </summary> ! /// <param name="methodInfo">MethodInfo to use for method signature instantiation.</param> ! public MethodSignature(MethodInfo methodInfo) ! { ! ParameterInfo[] paramInfos = methodInfo.GetParameters(); ! Type[] paramTypes = new Type[paramInfos.Length]; ! foreach (ParameterInfo paramInfo in paramInfos) ! { ! paramTypes[paramInfo.Position] = paramInfo.ParameterType; ! } ! _methodName = methodInfo.Name; ! _returnType = methodInfo.ReturnType; ! _paramTypes = paramTypes; ! } ! #endregion ! ! #region Public Properties ! ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s parameter types. ! /// </summary> ! public Type[] ParamTypes ! { ! get { return _paramTypes; } ! } ! ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s method name. ! /// </summary> ! public string MethodName ! { ! get { return _methodName; } ! } ! ! /// <summary> ! /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s return type. ! /// </summary> ! public Type ReturnType ! { ! get { return _returnType; } ! } ! ! #endregion ! ! /// <summary> ! /// Compare two signatures by content. ! /// </summary> ! public override bool Equals(object obj) ! { ! if (obj == null) ! { ! return false; ! } ! if (!(obj is MethodSignature)) ! { ! return false; ! } ! MethodSignature that = (MethodSignature) obj; ! if (that.MethodName.CompareTo(MethodName) != 0) ! { ! return false; ! } ! if (!that.ReturnType.Equals(ReturnType)) ! { ! return false; ! } ! if (that.ParamTypes.Length != ParamTypes.Length) ! { ! return false; ! } ! for (int idx = 0; idx < that.ParamTypes.Length; ++idx) ! { ! if (!that.ParamTypes[idx].Equals(ParamTypes[idx])) ! { ! return false; ! } ! } ! return true; ! } ! ! /// <summary> ! /// Returns string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/> ! /// </summary> ! /// <returns>string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/></returns> ! public override string ToString() ! { ! string paramTypesString = null; ! foreach (Type paramType in _paramTypes) ! { ! if (paramTypesString != null) ! { ! paramTypesString += ", "; ! } ! paramTypesString += paramType.ToString(); ! } ! string str = string.Format("{0} {1}({2})", _returnType.ToString(), _methodName, paramTypesString); ! return str; ! } ! } } \ No newline at end of file Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ExpectationMethod.cs 6 Mar 2006 02:24:58 -0000 1.27 --- ExpectationMethod.cs 6 Jun 2006 03:06:52 -0000 1.28 *************** *** 27,94 **** /// </summary> NoCall ! }; ! ! ! /// <summary> ! /// Expected method call used for building dynamic mocks ! /// </summary> ! public class ExpectationMethod : IMethodCallExpectation ! { ! /// <summary> ! /// Expected Method Name ! /// </summary> ! private string _expectedMethodName; ! /// <summary> ! /// Expectations on the arguments of the expected method call. ! /// </summary> ! private object[] _argumentExpectations; ! /// <summary> ! /// Expected return value for this method call if any. ! /// </summary> ! private object _expectedReturnValue; ! /// <summary> ! /// Exception to throw when the method is called ! /// </summary> ! private Exception _expectedException; /// <summary> /// The type of expectation, call or no call /// </summary> private ExpectationMethodType _expectationType; ! ! /// <summary> ! /// Actual <see cref="MethodCall"/>. ! /// </summary> ! private MethodCall _actualMethodCall = null; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! public ExpectationMethod( string methodName ) ! : this( methodName, null, null, null ) ! { ! } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! public ExpectationMethod( string methodName, object returnValue ) ! : this( methodName, returnValue, null, null ) ! { ! } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! /// <param name="argumentExpectations">Expectations on the arguments</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations ! ) ! : this( methodName, returnValue, argumentExpectations, null ) ! { ! } /// <summary> /// Default Constructor --- 27,102 ---- /// </summary> NoCall ! } ; ! ! ! /// <summary> ! /// Expected method call used for building dynamic mocks ! /// </summary> ! public class ExpectationMethod : IMethodCallExpectation ! { ! /// <summary> ! /// Expected Method Name ! /// </summary> ! private string _expectedMethodName; ! ! /// <summary> ! /// Expectations on the arguments of the expected method call. ! /// </summary> ! private object[] _argumentExpectations; ! ! /// <summary> ! /// Expected return value for this method call if any. ! /// </summary> ! private object _expectedReturnValue; ! ! /// <summary> ! /// Exception to throw when the method is called ! /// </summary> ! private Exception _expectedException; ! /// <summary> /// The type of expectation, call or no call /// </summary> private ExpectationMethodType _expectationType; ! ! /// <summary> ! /// Actual <see cref="MethodCall"/>. ! /// </summary> ! private MethodCall _actualMethodCall = null; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! public ExpectationMethod(string methodName) ! : this(methodName, null, null, null) ! { ! } ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! public ExpectationMethod(string methodName, object returnValue) ! : this(methodName, returnValue, null, null) ! { ! } ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! /// <param name="argumentExpectations">Expectations on the arguments</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations ! ) ! : this(methodName, returnValue, argumentExpectations, null) ! { ! } ! /// <summary> /// Default Constructor *************** *** 106,112 **** : this(methodName, returnValue, argumentExpectations, expectedException, ExpectationMethodType.Call) { ! ! } ! /// <summary> /// Default Constructor /// </summary> --- 114,120 ---- : this(methodName, returnValue, argumentExpectations, expectedException, ExpectationMethodType.Call) { ! } ! ! /// <summary> /// Default Constructor /// </summary> *************** *** 130,133 **** --- 138,142 ---- _expectationType = expectationType; } + /// <summary> /// Expected Method Name *************** *** 135,357 **** public string ExpectedMethodName { ! get ! { ! return _expectedMethodName; ! } ! } ! /// <summary> /// Expected Method Type /// </summary> public ExpectationMethodType ExpectationType { get { ! return _expectationType; } } ! /// <summary> ! /// Expected Return Value ! /// </summary> ! public object ReturnValue ! { ! get ! { ! return _expectedReturnValue; ! } ! } ! /// <summary> ! /// True if actual method call was set. ! /// <seealso cref="ActualMethodCall"/> ! /// </summary> ! public bool ActualMethodCallWasSet ! { ! get ! { ! return _actualMethodCall != null; ! } ! } ! /// <summary> ! /// <see cref="MethodInfo"/> of actual method called. ! /// </summary> ! public MethodInfo ActualMethod ! { ! get ! { ! return ActualMethodCall.Method; ! } ! } ! /// <summary> ! /// Name of actual method called. ! /// </summary> ! public string ActualMethodName ! { ! get ! { ! return ActualMethodCall.MethodName; ! } ! } ! /// <summary> ! /// Actual method call. ! /// </summary> ! public MethodCall ActualMethodCall ! { ! get ! { ! if ( ! ActualMethodCallWasSet ) ! { ! throw new InvalidOperationException( ! "Cannot get property ActualMethodCall " + ! "before setting it." ! ); ! } ! return _actualMethodCall; ! } ! set ! { ! if ( value == null ) ! { ! throw new ArgumentNullException( ! "Cannot set ActualMethodCall property to null" ! ); ! } ! if ( ActualMethodCallWasSet ) ! { ! throw new InvalidOperationException( ! "Cannot set property ActualMethodCall " + ! "more than once." ! ); ! } ! _actualMethodCall = value; ! } ! } ! //TODO: Refactor methods ! private string argsToString( object[] args ) ! { ! if ( args != null && args.Length > 0 ) ! { ! string[] argText = new string[args.Length]; ! for ( int i = 0; i < args.Length; ++i ) ! { ! object arg = args[ i ]; ! if ( object.ReferenceEquals( arg, null ) ) ! { ! argText[ i ] = "null"; ! } ! else if ( arg is string ) ! { ! argText[ i ] = "\"" + arg.ToString( ) + "\""; ! } ! else ! { ! argText[ i ] = arg.ToString( ); ! } ! } ! return String.Join( ", ", argText ); ! } ! return String.Empty; ! } ! /// <summary> ! /// Verifies this expectation, when the method is called ! /// </summary> ! public void Verify( ) ! { ! if ( ! ActualMethodCallWasSet ) ! { ! Assertion.Fail( String.Format( ! "{0}({1}) expected but never called.", ! ExpectedMethodName, ! argsToString( _argumentExpectations ) ! ) ); ! } if (ExpectedMethodName != ActualMethodName && _expectationType == ExpectationMethodType.Call) { Assertion.Fail(String.Format( ! "{0}({1}) expected, but {2} called.", ! ExpectedMethodName, argsToString(_argumentExpectations), ! ActualMethodCall ! )); } if (ExpectedMethodName == ActualMethodName && _expectationType == ExpectationMethodType.NoCall) { Assertion.Fail(String.Format( ! "{0}({1}) was not expected.", ! ExpectedMethodName, argsToString(_argumentExpectations) ! )); } if (_argumentExpectations == null) ! { ! return; ! } ! object[] actualArguments = ActualMethodCall.Arguments; ! // actual arguments must be equal to expectations ! if ( actualArguments.Length != _argumentExpectations.Length ) ! { ! Assertion.Fail( String.Format( ! "Expected {0} arguments but received {1} " + ! "in method call {2}.", ! _argumentExpectations.Length, ! actualArguments.Length, ! ActualMethodCall ! ) ); ! } ! // assert that each passed in arg is validated by the appropriate predicate. ! for ( int i = 0; i < _argumentExpectations.Length; i++ ) ! { ! object argumentExpectation = _argumentExpectations[ i ]; ! object actualArgument = actualArguments[ i ]; ! // evaluate whether input expectations have been met ! IPredicate predicate = ! PredicateUtils.ConvertFrom( argumentExpectation ); ! bool isPredicateSatisfied = ! predicate.Eval( actualArgument ); ! if ( ! isPredicateSatisfied ) ! { ! Assertion.Fail( String.Format( ! "Failed to satisfy '{0}' on argument[{1}] " + ! "of method call {2}", ! predicate, ! i, ! ActualMethodCall ! ) ); ! } ! // return output expectations if specified ! IArgumentMutator mutator = ! argumentExpectation as IArgumentMutator; ! if ( mutator != null ) ! { ! mutator.Mutate( ref actualArguments[ i ] ); ! } ! } ! if ( _expectedReturnValue!=null ) ! { ! // handle return values that are ValueTypes and ensure they can be casted ! // in the IL that unboxes the return value. ! Type expectedReturnType = _expectedReturnValue.GetType(); ! Type returnType = ActualMethod.ReturnType; ! if ( returnType!=typeof(void) && returnType.IsValueType ) ! { ! if ( returnType!=expectedReturnType ) ! { ! _expectedReturnValue = Convert.ChangeType(_expectedReturnValue, returnType); ! } ! } ! } ! // if exception setup to be thrown, throw it ! if ( _expectedException != null ) ! { ! throw _expectedException; ! } ! } ! /// <summary> ! /// Check actual incoming method call and return expected outgoing response. ! /// <see cref="IMethodCallExpectation.CheckCallAndSendResponse"/> ! /// </summary> ! public object CheckCallAndSendResponse( MethodCall call ) ! { ! _actualMethodCall = call; ! this.Verify( ); ! return _expectedReturnValue; ! } ! } } \ No newline at end of file --- 144,357 ---- public string ExpectedMethodName { ! get { return _expectedMethodName; } ! } ! ! /// <summary> /// Expected Method Type /// </summary> public ExpectationMethodType ExpectationType { + get { return _expectationType; } + } + + /// <summary> + /// Expected Return Value + /// </summary> + public object ReturnValue + { + get { return _expectedReturnValue; } + } + + /// <summary> + /// True if actual method call was set. + /// <seealso cref="ActualMethodCall"/> + /// </summary> + public bool ActualMethodCallWasSet + { + get { return _actualMethodCall != null; } + } + + /// <summary> + /// <see cref="MethodInfo"/> of actual method called. + /// </summary> + public MethodInfo ActualMethod + { + get { return ActualMethodCall.Method; } + } + + /// <summary> + /// Name of actual method called. + /// </summary> + public string ActualMethodName + { + get { return ActualMethodCall.MethodName; } + } + + /// <summary> + /// Actual method call. + /// </summary> + public MethodCall ActualMethodCall + { get { ! if (! ActualMethodCallWasSet) ! { ! throw new InvalidOperationException( ! "Cannot get property ActualMethodCall " + ! "before setting it." ! ); ! } ! return _actualMethodCall; ! } ! set ! { ! if (value == null) ! { ! throw new ArgumentNullException( ! "Cannot set ActualMethodCall property to null" ! ); ! } ! if (ActualMethodCallWasSet) ! { ! throw new InvalidOperationException( ! "Cannot set property ActualMethodCall " + ! "more than once." ! ); ! } ! _actualMethodCall = value; } } ! ! //TODO: Refactor methods ! private string argsToString(object[] args) ! { ! if (args != null && args.Length > 0) ! { ! string[] argText = new string[args.Length]; ! for (int i = 0; i < args.Length; ++i) ! { ! object arg = args[i]; ! if (ReferenceEquals(arg, null)) ! { ! argText[i] = "null"; ! } ! else if (arg is string) ! { ! argText[i] = "\"" + arg.ToString() + "\""; ! } ! else ! { ! argText[i] = arg.ToString(); ! } ! } ! return String.Join(", ", argText); ! } ! return String.Empty; ! } ! ! /// <summary> ! /// Verifies this expectation, when the method is called ! /// </summary> ! public void Verify() ! { ! if (! ActualMethodCallWasSet) ! { ! Assertion.Fail(String.Format( ! "{0}({1}) expected but never called.", ! ExpectedMethodName, ! argsToString(_argumentExpectations) ! )); ! } if (ExpectedMethodName != ActualMethodName && _expectationType == ExpectationMethodType.Call) { Assertion.Fail(String.Format( ! "{0}({1}) expected, but {2} called.", ! ExpectedMethodName, argsToString(_argumentExpectations), ! ActualMethodCall ! )); } if (ExpectedMethodName == ActualMethodName && _expectationType == ExpectationMethodType.NoCall) { Assertion.Fail(String.Format( ! "{0}({1}) was not expected.", ! ExpectedMethodName, argsToString(_argumentExpectations) ! )); } if (_argumentExpectations == null) ! { ! return; ! } ! object[] actualArguments = ActualMethodCall.Arguments; ! // actual arguments must be equal to expectations ! if (actualArguments.Length != _argumentExpectations.Length) ! { ! Assertion.Fail(String.Format( ! "Expected {0} arguments but received {1} " + ! "in method call {2}.", ! _argumentExpectations.Length, ! actualArguments.Length, ! ActualMethodCall ! )); ! } ! // assert that each passed in arg is validated by the appropriate predicate. ! for (int i = 0; i < _argumentExpectations.Length; i++) ! { ! object argumentExpectation = _argumentExpectations[i]; ! object actualArgument = actualArguments[i]; ! // evaluate whether input expectations have been met ! IPredicate predicate = ! PredicateUtils.ConvertFrom(argumentExpectation); ! bool isPredicateSatisfied = ! predicate.Eval(actualArgument); ! if (! isPredicateSatisfied) ! { ! Assertion.Fail(String.Format( ! "Failed to satisfy '{0}' on argument[{1}] " + ! "of method call {2}", ! predicate, ! i, ! ActualMethodCall ! )); ! } ! // return output expectations if specified ! IArgumentMutator mutator = ! argumentExpectation as IArgumentMutator; ! if (mutator != null) ! { ! mutator.Mutate(ref actualArguments[i]); ! } ! } ! if (_expectedReturnValue != null) ! { ! // handle return values that are ValueTypes and ensure they can be casted ! // in the IL that unboxes the return value. ! Type expectedReturnType = _expectedReturnValue.GetType(); ! Type returnType = ActualMethod.ReturnType; ! if (returnType != typeof (void) && returnType.IsValueType) ! { ! if (returnType != expectedReturnType) ! { ! _expectedReturnValue = Convert.ChangeType(_expectedReturnValue, returnType); ! } ! } ! } ! // if exception setup to be thrown, throw it ! if (_expectedException != null) ! { ! throw _expectedException; ! } ! } ! ! /// <summary> ! /// Check actual incoming method call and return expected outgoing response. ! /// <see cref="IMethodCallExpectation.CheckCallAndSendResponse"/> ! /// </summary> ! public object CheckCallAndSendResponse(MethodCall call) ! { ! _actualMethodCall = call; ! Verify(); ! return _expectedReturnValue; ! } ! } } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:29
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock/Dynamic/Predicates Modified Files: AbstractPredicate.cs IsIn.cs IsMatch.cs IsTypeOf.cs Predicate.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: IsTypeOf.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsTypeOf.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IsTypeOf.cs 20 Feb 2005 09:26:49 -0000 1.4 --- IsTypeOf.cs 6 Jun 2006 03:06:52 -0000 1.5 *************** *** 1,46 **** #region License // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. #endregion #region Imports using System; #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that evaluates the input value against the expected <see cref="Type"/> ! /// </summary> ! public class IsTypeOf : AbstractPredicate ! { ! private Type _type; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">type to evaluate against</param> ! public IsTypeOf(Type type) ! { ! this._type = type; ! } ! /// <summary> ! /// Evaluates the input value to verify that it is correctly typed. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>True if the original type is assignable from the input value, false otherwise.</returns> ! public override bool Eval(object currentValue) ! { ! return currentValue == null ? false : _type.IsAssignableFrom(currentValue.GetType()); ! } ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} is a {1}", ! name, ! _type.FullName ! ); ! } ! } ! } --- 1,54 ---- #region License + // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. + #endregion + #region Imports + using System; + #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that evaluates the input value against the expected <see cref="Type"/> ! /// </summary> ! public class IsTypeOf : AbstractPredicate ! { ! private Type _type; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">type to evaluate against</param> ! public IsTypeOf(Type type) ! { ! _type = type; ! } ! ! /// <summary> ! /// Evaluates the input value to verify that it is correctly typed. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>True if the original type is assignable from the input value, false otherwise.</returns> ! public override bool Eval(object currentValue) ! { ! return currentValue == null ? false : _type.IsAssignableFrom(currentValue.GetType()); ! } ! ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} is a {1}", ! name, ! _type.FullName ! ); ! } ! } ! } \ No newline at end of file Index: IsMatch.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsMatch.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IsMatch.cs 20 Feb 2005 09:26:49 -0000 1.4 --- IsMatch.cs 6 Jun 2006 03:06:52 -0000 1.5 *************** *** 1,58 **** #region License // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. #endregion #region Imports using System; using System.Text.RegularExpressions; #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that compares the input value against an regular expression pattern. ! /// </summary> ! public class IsMatch : AbstractPredicate ! { ! private Regex _regex; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression object to use.</param> ! public IsMatch(Regex regex) ! { ! this._regex = regex; ! } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! public IsMatch(String regex) : this(new Regex(regex)) {} ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! /// <param name="ignoreCase">Flag indicating if the regular expression object should ignore case or not.</param> ! public IsMatch(String regex, bool ignoreCase) : this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) {} ! /// <summary> ! /// Evaluates the input value against the provided regular expression ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the regular expression matches the input value, flase otherwise.</returns> ! public override bool Eval(object inputValue) ! { ! return inputValue == null ? false : _regex.IsMatch(inputValue.ToString()); ! } ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} matches /{1}/", ! name, ! _regex ! ); ! } ! } ! } --- 1,73 ---- #region License + // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. + #endregion + #region Imports + using System; using System.Text.RegularExpressions; + #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that compares the input value against an regular expression pattern. ! /// </summary> ! public class IsMatch : AbstractPredicate ! { ! private Regex _regex; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression object to use.</param> ! public IsMatch(Regex regex) ! { ! _regex = regex; ! } ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! public IsMatch(String regex) : this(new Regex(regex)) ! { ! } ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! /// <param name="ignoreCase">Flag indicating if the regular expression object should ignore case or not.</param> ! public IsMatch(String regex, bool ignoreCase) ! : this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) ! { ! } ! ! /// <summary> ! /// Evaluates the input value against the provided regular expression ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the regular expression matches the input value, flase otherwise.</returns> ! public override bool Eval(object inputValue) ! { ! return inputValue == null ? false : _regex.IsMatch(inputValue.ToString()); ! } ! ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} matches /{1}/", ! name, ! _regex ! ); ! } ! } ! } \ No newline at end of file Index: IsIn.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsIn.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IsIn.cs 20 Feb 2005 09:26:49 -0000 1.4 --- IsIn.cs 6 Jun 2006 03:06:52 -0000 1.5 *************** *** 1,64 **** #region License // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. #endregion #region Imports - using System; using DotNetMock.Util; #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that looks for an input value in an array of values. ! /// </summary> ! public class IsIn : AbstractPredicate ! { ! private object[] _inList; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">array of values to use for searching</param> ! public IsIn(params object[] inList) ! { ! if (inList.Length == 1 && inList[0].GetType().IsArray) ! { ! Array arr = (Array)inList[0]; ! this._inList = new object[arr.Length]; ! arr.CopyTo(this._inList, 0); ! } ! else ! { ! this._inList = inList; ! } ! } ! /// <summary> ! /// Evaluates the input value by looking within the original array list of values for the input value. ! /// </summary> ! /// <param name="inputValue">input value to look for</param> ! /// <returns>True if the input value is found, false otherwise.</returns> ! public override bool Eval(object inputValue) ! { ! foreach (object o in _inList) ! { ! if (o.Equals(inputValue)) ! { ! return true; ! } ! } ! return false; ! } ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} is in [{1}]", ! name, ! StringUtils.FormatArray(_inList) ! ); ! } ! } ! } --- 1,71 ---- #region License + // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. + #endregion + #region Imports + using System; using DotNetMock.Util; + #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that looks for an input value in an array of values. ! /// </summary> ! public class IsIn : AbstractPredicate ! { ! private object[] _inList; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">array of values to use for searching</param> ! public IsIn(params object[] inList) ! { ! if (inList.Length == 1 && inList[0].GetType().IsArray) ! { ! Array arr = (Array) inList[0]; ! _inList = new object[arr.Length]; ! arr.CopyTo(_inList, 0); ! } ! else ! { ! _inList = inList; ! } ! } ! ! /// <summary> ! /// Evaluates the input value by looking within the original array list of values for the input value. ! /// </summary> ! /// <param name="inputValue">input value to look for</param> ! /// <returns>True if the input value is found, false otherwise.</returns> ! public override bool Eval(object inputValue) ! { ! foreach (object o in _inList) ! { ! if (o.Equals(inputValue)) ! { ! return true; ! } ! } ! return false; ! } ! ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! public override string ExpressionAsText(string name) ! { ! return String.Format( ! "{0} is in [{1}]", ! name, ! StringUtils.FormatArray(_inList) ! ); ! } ! } ! } \ No newline at end of file Index: Predicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/Predicate.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Predicate.cs 20 Feb 2005 09:26:49 -0000 1.4 --- Predicate.cs 6 Jun 2006 03:06:52 -0000 1.5 *************** *** 1,32 **** namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that accepts a reference to the a delegate instance that performs the evaluation. ! /// </summary> ! public class Predicate : AbstractPredicate ! { ! /// <summary> ! /// Delegate that will perform the evaluation of the input value. ! /// </summary> ! public delegate bool EvaluationMethod(object currentValue); ! ! private EvaluationMethod _evaluationMethod; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="m">Delegate Reference</param> ! public Predicate(EvaluationMethod m) ! { ! this._evaluationMethod = m; ! } ! /// <summary> ! /// Evaluates the input value using the delegate method supplied. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>The results of the delegation methods evaluation</returns> ! public override bool Eval(object currentValue) ! { ! return _evaluationMethod(currentValue); ! } ! } ! } --- 1,34 ---- namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// <see cref="IPredicate"/> that accepts a reference to the a delegate instance that performs the evaluation. ! /// </summary> ! public class Predicate : AbstractPredicate ! { ! /// <summary> ! /// Delegate that will perform the evaluation of the input value. ! /// </summary> ! public delegate bool EvaluationMethod(object currentValue); ! ! private EvaluationMethod _evaluationMethod; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="m">Delegate Reference</param> ! public Predicate(EvaluationMethod m) ! { ! _evaluationMethod = m; ! } ! ! /// <summary> ! /// Evaluates the input value using the delegate method supplied. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>The results of the delegation methods evaluation</returns> ! public override bool Eval(object currentValue) ! { ! return _evaluationMethod(currentValue); ! } ! } ! } \ No newline at end of file Index: AbstractPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/AbstractPredicate.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractPredicate.cs 20 Feb 2005 09:26:49 -0000 1.1 --- AbstractPredicate.cs 6 Jun 2006 03:06:52 -0000 1.2 *************** *** 1,46 **** #region License // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. ! #endregion ! #region Imports ! using System; ! using System.Collections; #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// Abstract base class for all predicates. ! /// </summary> ! public abstract class AbstractPredicate : IPredicate ! { ! /// <summary> ! /// Evaluates whether input value satisfies this predicate. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>true if the predicate was satisfied</returns> ! public abstract bool Eval(object inputValue); ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! /// <param name="name"> ! /// name of value/variable to use in the expression text ! /// </param> ! /// <returns>text representation of this predicate</returns> ! public virtual string ExpressionAsText(string name) ! { ! return "(N/A)"; ! } ! /// <summary> ! /// Returns a <see cref="String"/> that represents the ! /// expression evaluated by this <see cref="IPredicate"/>. ! /// </summary> ! /// <returns> ! /// Expression evaluated by this predicate. ! /// </returns> ! public override string ToString() ! { ! return ExpressionAsText("value"); ! } ! } ! } --- 1,46 ---- #region License + // Copyright (c) 2004 Griffin Caprio & Choy Rim. All rights reserved. ! #endregion namespace DotNetMock.Dynamic.Predicates { ! /// <summary> ! /// Abstract base class for all predicates. ! /// </summary> ! public abstract class AbstractPredicate : IPredicate ! { ! /// <summary> ! /// Evaluates whether input value satisfies this predicate. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>true if the predicate was satisfied</returns> ! public abstract bool Eval(object inputValue); ! ! /// <summary> ! /// Text representation of what is evaluated by the ! /// <see cref="Eval"/> method. ! /// </summary> ! /// <param name="name"> ! /// name of value/variable to use in the expression text ! /// </param> ! /// <returns>text representation of this predicate</returns> ! public virtual string ExpressionAsText(string name) ! { ! return "(N/A)"; ! } ! ! /// <summary> ! /// Returns a <see cref="string"/> that represents the ! /// expression evaluated by this <see cref="IPredicate"/>. ! /// </summary> ! /// <returns> ! /// Expression evaluated by this predicate. ! /// </returns> ! public override string ToString() ! { ! return ExpressionAsText("value"); ! } ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:29
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Security/Principal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Framework/Security/Principal Modified Files: MockIIdentity.cs MockIPrincipal.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: MockIPrincipal.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Security/Principal/MockIPrincipal.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MockIPrincipal.cs 5 Feb 2005 22:05:09 -0000 1.5 --- MockIPrincipal.cs 6 Jun 2006 03:06:52 -0000 1.6 *************** *** 1,105 **** - using System; using System.Collections; using System.Security.Principal; - using DotNetMock; namespace DotNetMock.Framework.Security.Principal { ! /// <summary> ! /// Mock Object to implement the IPrincipal interface ! /// </summary> ! public class MockIPrincipal : MockObject, IPrincipal ! { ! /// <summary> ! /// Current Identity associated with this Principal ! /// </summary> ! private IIdentity _expectedIdentity = null; ! /// <summary> ! /// Expected number of IsInRole() calls ! /// </summary> ! private ExpectationCounter _isInRoleCalls = new ExpectationCounter("MockIPrincipal.IsIsRoleCalls"); ! /// <summary> ! /// Lists of roles the current Principal belongs to ! /// </summary> ! private ArrayList _roles = null; ! /// <summary> ! /// Default Constructor ! /// </summary> ! public MockIPrincipal() : base("MockIPrincipal") ! { ! _roles = new ArrayList(); ! } ! #region MockMethods ! /// <summary> ! /// Sets the expected value of Identity to return ! /// </summary> ! /// <param name="identity">Identity for current Principal</param> ! public void SetExpectedIdentity( IIdentity identity ) ! { ! _expectedIdentity = identity; ! } ! /// <summary> ! /// Sets the number of calls to IsInRole() ! /// </summary> ! /// <param name="count">expected number of calls to IsInRol()</param> ! public void SetExpectedIsInRoleCount( int count ) ! { ! _isInRoleCalls.Expected = count; ! } ! /// <summary> ! /// Adds the given role to the list of roles this Principal belongs to ! /// </summary> ! /// <param name="role">role to add</param> ! public void AddExpectedRole( string role ) ! { ! _roles.Add( role ); ! } ! /// <summary> ! /// Adds the given roles to the list of roles this Principal belongs to ! /// </summary> ! /// <param name="roles"></param> ! public void AddExpectedRoles( string[] roles ) ! { ! for (int i = 0; i < roles.Length; i++) ! { ! AddExpectedRole( roles[i] ); ! } ! } ! #endregion ! #region Implementation of IPrincipal ! /// <summary> ! /// Returns true/false if the current principal belongs to the given role ! /// </summary> ! /// <param name="roleToSearch">Role to check for</param> ! /// <returns>True/False</returns> ! public bool IsInRole(string roleToSearch) ! { ! _isInRoleCalls.Inc(); ! bool found = false; ! foreach (string role in _roles) ! { ! if (role.Equals(roleToSearch)) ! { ! found = true; ! } ! } ! return found; ! } ! /// <summary> ! /// Returns the current Identity associated with this Principal ! /// </summary> ! public System.Security.Principal.IIdentity Identity ! { ! get ! { ! if (_expectedIdentity == null) ! { ! return new MockIIdentity(); ! } ! return _expectedIdentity; ! } ! } ! #endregion ! } ! } --- 1,115 ---- using System.Collections; using System.Security.Principal; namespace DotNetMock.Framework.Security.Principal { ! /// <summary> ! /// Mock Object to implement the IPrincipal interface ! /// </summary> ! public class MockIPrincipal : MockObject, IPrincipal ! { ! /// <summary> ! /// Current Identity associated with this Principal ! /// </summary> ! private IIdentity _expectedIdentity = null; ! /// <summary> ! /// Expected number of IsInRole() calls ! /// </summary> ! private ExpectationCounter _isInRoleCalls = new ExpectationCounter("MockIPrincipal.IsIsRoleCalls"); ! ! /// <summary> ! /// Lists of roles the current Principal belongs to ! /// </summary> ! private ArrayList _roles = null; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! public MockIPrincipal() : base("MockIPrincipal") ! { ! _roles = new ArrayList(); ! } ! ! #region MockMethods ! ! /// <summary> ! /// Sets the expected value of Identity to return ! /// </summary> ! /// <param name="identity">Identity for current Principal</param> ! public void SetExpectedIdentity(IIdentity identity) ! { ! _expectedIdentity = identity; ! } ! ! /// <summary> ! /// Sets the number of calls to IsInRole() ! /// </summary> ! /// <param name="count">expected number of calls to IsInRol()</param> ! public void SetExpectedIsInRoleCount(int count) ! { ! _isInRoleCalls.Expected = count; ! } ! ! /// <summary> ! /// Adds the given role to the list of roles this Principal belongs to ! /// </summary> ! /// <param name="role">role to add</param> ! public void AddExpectedRole(string role) ! { ! _roles.Add(role); ! } ! ! /// <summary> ! /// Adds the given roles to the list of roles this Principal belongs to ! /// </summary> ! /// <param name="roles"></param> ! public void AddExpectedRoles(string[] roles) ! { ! for (int i = 0; i < roles.Length; i++) ! { ! AddExpectedRole(roles[i]); ! } ! } ! ! #endregion ! ! #region Implementation of IPrincipal ! ! /// <summary> ! /// Returns true/false if the current principal belongs to the given role ! /// </summary> ! /// <param name="roleToSearch">Role to check for</param> ! /// <returns>True/False</returns> ! public bool IsInRole(string roleToSearch) ! { ! _isInRoleCalls.Inc(); ! bool found = false; ! foreach (string role in _roles) ! { ! if (role.Equals(roleToSearch)) ! { ! found = true; ! } ! } ! return found; ! } ! ! /// <summary> ! /// Returns the current Identity associated with this Principal ! /// </summary> ! public IIdentity Identity ! { ! get ! { ! if (_expectedIdentity == null) ! { ! return new MockIIdentity(); ! } ! return _expectedIdentity; ! } ! } ! ! #endregion ! } ! } \ No newline at end of file Index: MockIIdentity.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Security/Principal/MockIIdentity.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MockIIdentity.cs 5 Feb 2005 22:05:09 -0000 1.5 --- MockIIdentity.cs 6 Jun 2006 03:06:52 -0000 1.6 *************** *** 1,90 **** - using System; - using DotNetMock; using System.Security.Principal; namespace DotNetMock.Framework.Security.Principal { ! /// <summary> ! /// MockObject implementing the IIdentity interface. Since the IIdentity interface only includes getters, ! /// this MockObject does not do much. ! /// </summary> ! public class MockIIdentity : MockObject, IIdentity ! { ! /// <summary> ! /// The expected AuthenticationType ! /// </summary> ! private string _expectedAuthType = ""; ! /// <summary> ! /// The expected Name ! /// </summary> ! private string _expectedName = ""; ! /// <summary> ! /// The expected value for IsAuthenticated ! /// </summary> ! private bool _expectedIsAuth = false; ! /// <summary> ! /// Default Constructor ! /// </summary> ! public MockIIdentity() : base("MockIdentity") ! { ! } ! #region Mock Methods ! /// <summary> ! /// Sets the expected AuthenticationType value to return ! /// </summary> ! /// <param name="authType">Authentication Type to return</param> ! public void SetExpectedAuthenticationType( string authType ) ! { ! _expectedAuthType = authType; ! } ! /// <summary> ! /// Sets the expected IsAuthenticated value to return ! /// </summary> ! /// <param name="isAuth">IsAuthenticated value to return</param> ! public void SetExpectedIsAuthenticated( bool isAuth ) ! { ! _expectedIsAuth = isAuth; ! } ! /// <summary> ! /// Sets the expected Name value to return ! /// </summary> ! /// <param name="name">Name value to return</param> ! public void SetExpectedName( string name ) ! { ! _expectedName = name; ! } ! #endregion ! #region Implementation of IIdentity ! /// <summary> ! /// Returns true/false if the current Identity is Authenticated or not ! /// </summary> ! public bool IsAuthenticated ! { ! get ! { ! return _expectedIsAuth; ! } ! } ! /// <summary> ! /// Returns the name of the current Identity ! /// </summary> ! public string Name ! { ! get ! { ! return _expectedName; ! } ! } ! /// <summary> ! /// Returns the current Authentication Type ! /// </summary> ! public string AuthenticationType ! { ! get ! { ! return _expectedAuthType; ! } ! } ! #endregion ! } ! } --- 1,92 ---- using System.Security.Principal; namespace DotNetMock.Framework.Security.Principal { ! /// <summary> ! /// MockObject implementing the IIdentity interface. Since the IIdentity interface only includes getters, ! /// this MockObject does not do much. ! /// </summary> ! public class MockIIdentity : MockObject, IIdentity ! { ! /// <summary> ! /// The expected AuthenticationType ! /// </summary> ! private string _expectedAuthType = ""; ! ! /// <summary> ! /// The expected Name ! /// </summary> ! private string _expectedName = ""; ! ! /// <summary> ! /// The expected value for IsAuthenticated ! /// </summary> ! private bool _expectedIsAuth = false; ! ! /// <summary> ! /// Default Constructor ! /// </summary> ! public MockIIdentity() : base("MockIdentity") ! { ! } ! ! #region Mock Methods ! ! /// <summary> ! /// Sets the expected AuthenticationType value to return ! /// </summary> ! /// <param name="authType">Authentication Type to return</param> ! public void SetExpectedAuthenticationType(string authType) ! { ! _expectedAuthType = authType; ! } ! ! /// <summary> ! /// Sets the expected IsAuthenticated value to return ! /// </summary> ! /// <param name="isAuth">IsAuthenticated value to return</param> ! public void SetExpectedIsAuthenticated(bool isAuth) ! { ! _expectedIsAuth = isAuth; ! } ! ! /// <summary> ! /// Sets the expected Name value to return ! /// </summary> ! /// <param name="name">Name value to return</param> ! public void SetExpectedName(string name) ! { ! _expectedName = name; ! } ! ! #endregion ! ! #region Implementation of IIdentity ! ! /// <summary> ! /// Returns true/false if the current Identity is Authenticated or not ! /// </summary> ! public bool IsAuthenticated ! { ! get { return _expectedIsAuth; } ! } ! ! /// <summary> ! /// Returns the name of the current Identity ! /// </summary> ! public string Name ! { ! get { return _expectedName; } ! } ! ! /// <summary> ! /// Returns the current Authentication Type ! /// </summary> ! public string AuthenticationType ! { ! get { return _expectedAuthType; } ! } ! ! #endregion ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:06
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.MbUnitTests In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Examples.MbUnitTests Modified Files: DotNetMock.Examples.MbUnitTests.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Examples.MbUnitTests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.MbUnitTests/DotNetMock.Examples.MbUnitTests.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DotNetMock.Examples.MbUnitTests.csproj 11 Feb 2005 05:41:36 -0000 1.1 --- DotNetMock.Examples.MbUnitTests.csproj 6 Jun 2006 03:06:51 -0000 1.2 *************** *** 1,145 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{EE85D1DF-A4EC-457F-8409-4A33E823B5D8}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Examples.MbUnitTests" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Examples.MbUnitTests" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "MbUnit.Framework" ! AssemblyName = "MbUnit.Framework" ! HintPath = "..\lib-ext\MbUnit-2.22\MbUnit.Framework.dll" ! /> ! <Reference ! Name = "MbUnit.Core" ! AssemblyName = "MbUnit.Core" ! HintPath = "..\lib-ext\MbUnit-2.22\MbUnit.Core.dll" ! /> ! <Reference ! Name = "DotNetMock.Framework" ! Project = "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "DotNetMock.Examples" ! Project = "{80B98B32-57CB-4989-B506-0F2B0AD94DBA}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "AssemblyInfo.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "CustomExpectation\ExpectationPersonTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\WeatherTest.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\MailingListTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\CustomerNumberCollectorTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\SensitiveClassTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,137 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{EE85D1DF-A4EC-457F-8409-4A33E823B5D8}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Examples.MbUnitTests</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Examples.MbUnitTests</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="MbUnit.Core"> ! <Name>MbUnit.Core</Name> ! <HintPath>..\lib-ext\MbUnit-2.22\MbUnit.Core.dll</HintPath> ! </Reference> ! <Reference Include="MbUnit.Framework"> ! <Name>MbUnit.Framework</Name> ! <HintPath>..\lib-ext\MbUnit-2.22\MbUnit.Framework.dll</HintPath> ! </Reference> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock.Examples\DotNetMock.Examples.csproj"> ! <Name>DotNetMock.Examples</Name> ! <Project>{80B98B32-57CB-4989-B506-0F2B0AD94DBA}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! <ProjectReference Include="..\DotNetMock.Framework\DotNetMock.Framework.csproj"> ! <Name>DotNetMock.Framework</Name> ! <Project>{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="AssemblyInfo.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="CustomExpectation\ExpectationPersonTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\WeatherTest.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\MailingListTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\CustomerNumberCollectorTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\SensitiveClassTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:06
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Tests Modified Files: DotNetMock.Tests.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Tests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/DotNetMock.Tests.csproj,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** DotNetMock.Tests.csproj 25 Apr 2005 03:35:10 -0000 1.22 --- DotNetMock.Tests.csproj 6 Jun 2006 03:06:52 -0000 1.23 *************** *** 1,236 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{0FBE418F-86AF-4E83-B66F-C0177CE582BC}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Tests" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Tests" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "true" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "nunit.framework" ! AssemblyName = "nunit.framework" ! HintPath = "..\lib\nunit.framework.dll" ! Private = "True" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "AbstractIListExpectationTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "AssemblyInfo.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationArrayListTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationArrayTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationBoolTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationCounterTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationStringQueueTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationStringTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationTypeTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationValueTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MockObjectTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ReturnValueTest.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "VerifierTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\AbstractDynamicMockTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\AssignTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\DynamicMockTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\DynamicOrderedMockTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\ExpectationMethodTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\MethodCallTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\MethodSignatureTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\PredicateTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\PredicateUtilsTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\ClassGeneratorTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\ILUtilsTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\MockClassBuilderTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Util\StringUtilsTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,187 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{0FBE418F-86AF-4E83-B66F-C0177CE582BC}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Tests</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Tests</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="nunit.framework"> ! <Name>nunit.framework</Name> ! <HintPath>..\lib\nunit.framework.dll</HintPath> ! <Private>True</Private> ! </Reference> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="AbstractIListExpectationTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="AssemblyInfo.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\AbstractDynamicMockTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\AssignTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\DynamicMockTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\DynamicOrderedMockTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\ExpectationMethodTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\ClassGeneratorTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\ILUtilsTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\MockClassBuilderTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\MethodCallTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\MethodSignatureTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\PredicateTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\PredicateUtilsTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationArrayListTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationArrayTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationBoolTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationCounterTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationStringQueueTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationStringTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationTypeTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationValueTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MockObjectTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="NullTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ReturnValueTest.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Util\StringUtilsTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="VerifierTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:06
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.TestFramework.Tests In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.TestFramework.Tests Modified Files: DotNetMock.TestFramework.Tests.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.TestFramework.Tests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.TestFramework.Tests/DotNetMock.TestFramework.Tests.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DotNetMock.TestFramework.Tests.csproj 5 Feb 2005 21:46:25 -0000 1.3 --- DotNetMock.TestFramework.Tests.csproj 6 Jun 2006 03:06:52 -0000 1.4 *************** *** 1,131 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.TestFramework.Tests" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.TestFramework.Tests" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "nunit.framework" ! AssemblyName = "nunit.framework" ! HintPath = "..\lib\nunit.framework.dll" ! Private = "True" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "AssemblyInfo.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "csUnitStubMakerTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ImplementationFactoryTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MbUnitStubMakerTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NUnitStubMakerTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "StubClassMakerTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,124 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{6C2904D4-ADCC-4980-AED0-64A8C6F3AF69}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.TestFramework.Tests</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.TestFramework.Tests</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="nunit.framework"> ! <Name>nunit.framework</Name> ! <HintPath>..\lib\nunit.framework.dll</HintPath> ! <Private>True</Private> ! </Reference> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="AssemblyInfo.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="csUnitStubMakerTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ImplementationFactoryTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MbUnitStubMakerTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="NUnitStubMakerTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="StubClassMakerTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock Modified Files: DotNetMock.csproj ExpectationValue.cs IExpectation.cs IListExpectation.cs IMockObject.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: IMockObject.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IMockObject.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IMockObject.cs 16 Jul 2004 19:03:30 -0000 1.5 --- IMockObject.cs 6 Jun 2006 03:06:52 -0000 1.6 *************** *** 1,20 **** - using System; - namespace DotNetMock { ! /// <summary> ! /// Default IMockObject interface. Also inherits from the IVerifiable interface ! /// </summary> ! public interface IMockObject : IVerifiable ! { ! /// <summary> ! /// Throws a NotImplementedException with given method name in the exception message ! /// </summary> ! /// <param name="methodName">Method that is not supported</param> ! void NotImplemented( string methodName ); ! /// <summary> ! /// Name property for this mock object. ! /// </summary> ! string MockName {get; set;} ! } ! } --- 1,19 ---- namespace DotNetMock { ! /// <summary> ! /// Default IMockObject interface. Also inherits from the IVerifiable interface ! /// </summary> ! public interface IMockObject : IVerifiable ! { ! /// <summary> ! /// Throws a NotImplementedException with given method name in the exception message ! /// </summary> ! /// <param name="methodName">Method that is not supported</param> ! void NotImplemented(string methodName); ! ! /// <summary> ! /// Name property for this mock object. ! /// </summary> ! string MockName { get; set; } ! } ! } \ No newline at end of file Index: IExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IExpectation.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IExpectation.cs 5 Feb 2005 22:05:10 -0000 1.6 --- IExpectation.cs 6 Jun 2006 03:06:52 -0000 1.7 *************** *** 1,29 **** - using System; - namespace DotNetMock { ! /// <summary> ! /// Interface that all expectation implement. Also implements the Verifiable interface ! /// </summary> ! /// <remarks/> ! public interface IExpectation : IVerifiable ! { ! /// <summary> ! /// Gets/Sets Has Expectations ! /// </summary> ! bool HasExpectations {get;set;} ! /// <summary> ! /// Sets the verify immediate flag ! /// </summary> ! bool VerifyImmediate {get;set;} ! /// <summary> ! /// Gets should check immediate ! /// </summary> ! bool ShouldCheckImmediate {get;} ! /// <summary> ! /// Gets / Sets if the expectation should be strict or not. This means that as long as expectations are met, any other ! /// object state will be ignored. If this is false, only the set expectations will be allowed. ! /// </summary> ! bool Strict { get; set; } ! } ! } --- 1,30 ---- namespace DotNetMock { ! /// <summary> ! /// Interface that all expectation implement. Also implements the Verifiable interface ! /// </summary> ! /// <remarks/> ! public interface IExpectation : IVerifiable ! { ! /// <summary> ! /// Gets/Sets Has Expectations ! /// </summary> ! bool HasExpectations { get; set; } ! ! /// <summary> ! /// Sets the verify immediate flag ! /// </summary> ! bool VerifyImmediate { get; set; } ! ! /// <summary> ! /// Gets should check immediate ! /// </summary> ! bool ShouldCheckImmediate { get; } ! ! /// <summary> ! /// Gets / Sets if the expectation should be strict or not. This means that as long as expectations are met, any other ! /// object state will be ignored. If this is false, only the set expectations will be allowed. ! /// </summary> ! bool Strict { get; set; } ! } ! } \ No newline at end of file Index: ExpectationValue.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationValue.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ExpectationValue.cs 10 Oct 2004 07:25:05 -0000 1.19 --- ExpectationValue.cs 6 Jun 2006 03:06:52 -0000 1.20 *************** *** 3,80 **** namespace DotNetMock { ! /// <summary> ! /// Expectation Value implementation. Extends <c>AbstractStaticExpectation</c> ! /// </summary> ! /// <remarks/> ! public class ExpectationValue : AbstractStaticExpectation ! { ! private Object _actualValue = null; ! private Object _expectedValue = null; ! /// <summary> ! /// Default Constructor for ExpectationValue. Set the name for this Expectation ! /// </summary> ! /// <param name="name">Name of this Expectation</param> ! public ExpectationValue(string name) : base(name) ! { ! ClearActual(); ! } ! /// <summary> ! /// Clears Actual value. ! /// </summary> ! public override void ClearActual() ! { ! this._actualValue = null; ! } ! /// <summary> ! /// Clears Expected value. ! /// </summary> ! public override void ClearExpected() ! { ! this._expectedValue = null; ! HasExpectations = false; ! } ! /// <summary> ! /// Gets/Sets Actual values. ! /// </summary> ! public Object Actual ! { ! get ! { ! return this._actualValue; ! } ! set ! { ! this._actualValue = value; ! if (ShouldCheckImmediate) ! { ! Verify(); ! } ! } ! } ! /// <summary> ! /// Gets/Sets Expected value. ! /// </summary> ! public Object Expected ! { ! get ! { ! return this._expectedValue; ! } ! set ! { ! this._expectedValue = value; ! this.HasExpectations = true; ! } ! } ! /// <summary> ! /// Verifies object. ! /// </summary> ! public override void Verify() { ! if (this.HasExpectations) ! { ! Assertion.AssertEquals("Object values do not equal for object " + this.name ,this._expectedValue, this._actualValue); ! } ! } ! } ! } --- 3,80 ---- namespace DotNetMock { ! /// <summary> ! /// Expectation Value implementation. Extends <c>AbstractStaticExpectation</c> ! /// </summary> ! /// <remarks/> ! public class ExpectationValue : AbstractStaticExpectation ! { ! private Object _actualValue = null; ! private Object _expectedValue = null; ! /// <summary> ! /// Default Constructor for ExpectationValue. Set the name for this Expectation ! /// </summary> ! /// <param name="name">Name of this Expectation</param> ! public ExpectationValue(string name) : base(name) ! { ! ClearActual(); ! } ! ! /// <summary> ! /// Clears Actual value. ! /// </summary> ! public override void ClearActual() ! { ! _actualValue = null; ! } ! ! /// <summary> ! /// Clears Expected value. ! /// </summary> ! public override void ClearExpected() ! { ! _expectedValue = null; ! HasExpectations = false; ! } ! ! /// <summary> ! /// Gets/Sets Actual values. ! /// </summary> ! public Object Actual ! { ! get { return _actualValue; } ! set ! { ! _actualValue = value; ! if (ShouldCheckImmediate) ! { ! Verify(); ! } ! } ! } ! ! /// <summary> ! /// Gets/Sets Expected value. ! /// </summary> ! public Object Expected ! { ! get { return _expectedValue; } ! set ! { ! _expectedValue = value; ! HasExpectations = true; ! } ! } ! ! /// <summary> ! /// Verifies object. ! /// </summary> ! public override void Verify() ! { ! if (HasExpectations) ! { ! Assertion.AssertEquals("Object values do not equal for object " + name, _expectedValue, _actualValue); ! } ! } ! } ! } \ No newline at end of file Index: IListExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IListExpectation.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IListExpectation.cs 10 Oct 2004 06:46:46 -0000 1.1 --- IListExpectation.cs 6 Jun 2006 03:06:52 -0000 1.2 *************** *** 1,53 **** - using System; using System.Collections; namespace DotNetMock { ! /// <summary> ! /// IExpectationCollection interface. Interface for all collection based Expectations. Implements <c>IExpectation</c> interface ! /// </summary> ! /// <remarks/> ! public interface IListExpectation : IExpectation ! { ! /// <summary> ! /// Adds object to actual collection ! /// </summary> ! /// <param name="actual">object to add</param> ! void AddActual(object actual); ! /// <summary> ! /// Adds an array of objects to actual collection ! /// </summary> ! /// <param name="actualMany">array of objects to add</param> ! void AddActualMany(object[] actualMany); ! /// <summary> ! /// Adds a Collection that implements the IEnumerable interface to actual collection ! /// </summary> ! /// <param name="actualMany">Enumerator full of objects to add to the actual collection</param> ! void AddActualMany(IEnumerable actualMany); ! /// <summary> ! /// Adds the elements of an object that implements IList to the actual collection ! /// </summary> ! /// <param name="actualMany">List of objects to add to the actual collection</param> ! void AddActualMany(IList actualMany); ! /// <summary> ! /// Adds object to expected collection ! /// </summary> ! /// <param name="expected">Object to add to the expected collection</param> ! void AddExpected(object expected); ! /// <summary> ! /// Adds an array of objects to expected collection ! /// </summary> ! /// <param name="expectedMany">Objects to add to the expected collection</param> ! void AddExpectedMany(object[] expectedMany); ! /// <summary> ! /// Adds a Collection that implements the IEnumerable interface to expected collection ! /// </summary> ! /// <param name="expectedMany">Enumerator full of objects to add to the expected collection</param> ! void AddExpectedMany(IEnumerable expectedMany); ! /// <summary> ! /// Adds the elements of an object that implements IList to the expected collection ! /// </summary> ! /// <param name="expectedMany">IList to add to the expected collection</param> ! void AddExpectedMany(IList expectedMany); ! } ! } --- 1,59 ---- using System.Collections; namespace DotNetMock { ! /// <summary> ! /// IExpectationCollection interface. Interface for all collection based Expectations. Implements <c>IExpectation</c> interface ! /// </summary> ! /// <remarks/> ! public interface IListExpectation : IExpectation ! { ! /// <summary> ! /// Adds object to actual collection ! /// </summary> ! /// <param name="actual">object to add</param> ! void AddActual(object actual); ! ! /// <summary> ! /// Adds an array of objects to actual collection ! /// </summary> ! /// <param name="actualMany">array of objects to add</param> ! void AddActualMany(object[] actualMany); ! ! /// <summary> ! /// Adds a Collection that implements the IEnumerable interface to actual collection ! /// </summary> ! /// <param name="actualMany">Enumerator full of objects to add to the actual collection</param> ! void AddActualMany(IEnumerable actualMany); ! ! /// <summary> ! /// Adds the elements of an object that implements IList to the actual collection ! /// </summary> ! /// <param name="actualMany">List of objects to add to the actual collection</param> ! void AddActualMany(IList actualMany); ! ! /// <summary> ! /// Adds object to expected collection ! /// </summary> ! /// <param name="expected">Object to add to the expected collection</param> ! void AddExpected(object expected); ! ! /// <summary> ! /// Adds an array of objects to expected collection ! /// </summary> ! /// <param name="expectedMany">Objects to add to the expected collection</param> ! void AddExpectedMany(object[] expectedMany); ! ! /// <summary> ! /// Adds a Collection that implements the IEnumerable interface to expected collection ! /// </summary> ! /// <param name="expectedMany">Enumerator full of objects to add to the expected collection</param> ! void AddExpectedMany(IEnumerable expectedMany); ! ! /// <summary> ! /// Adds the elements of an object that implements IList to the expected collection ! /// </summary> ! /// <param name="expectedMany">IList to add to the expected collection</param> ! void AddExpectedMany(IList expectedMany); ! } ! } \ No newline at end of file Index: DotNetMock.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.csproj,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** DotNetMock.csproj 25 Apr 2005 03:35:10 -0000 1.40 --- DotNetMock.csproj 6 Jun 2006 03:06:52 -0000 1.41 *************** *** 1,430 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "DotNetMock.xml" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "true" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "DotNetMock.xml" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "AbstractExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "AbstractIListExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "AbstractStaticExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Assertion.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "AssertionException.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "DotNetMockException.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationArray.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationArrayList.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationBool.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationCounter.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationString.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationStringQueue.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationType.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ExpectationValue.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "IExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "IListExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "IMockObject.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "IVerifiable.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MockObject.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullObject.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "ReturnValue.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Verifier.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "VerifyException.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Core\ITestFramework.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\AbstractArgumentMutator.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Assign.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\DynamicMock.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\DynamicOrderedMock.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\ExpectationMethod.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IArgumentMutator.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IDynamicMock.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IMethodCallExpectation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IMockedCallHandler.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\IPredicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\MethodCall.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\MethodSignature.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\PredicateUtils.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\ClassGenerator.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\ILUtils.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Generate\MockClassBuilder.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\AbstractPredicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\AndPredicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsAnything.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsCloseTo.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsEqual.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsEqualIgnoreCase.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsEqualIgnoreWhiteSpace.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsIn.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsMatch.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsNull.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\IsTypeOf.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\NotEqual.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\NotIn.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\NotNull.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\NotPredicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\OrPredicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\Predicates\Predicate.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\AbstractStubMaker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\csUnitStubMaker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\IDynamicLinker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\Implementation.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\ImplementationFactory.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\IStubMaker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\MbUnitStubMaker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\NUnitStubMaker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\StubClassBuilder.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "TestFramework\SystemDynamicLinker.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Util\StringUtils.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,298 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{1AD0CD00-16FA-4456-B2ED-A47406957228}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile>DotNetMock.xml</DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile>DotNetMock.xml</DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="AbstractExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="AbstractIListExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="AbstractStaticExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Assertion.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="AssertionException.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Core\ITestFramework.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="DotNetMockException.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\AbstractArgumentMutator.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Assign.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\DynamicMock.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\DynamicOrderedMock.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\ExpectationMethod.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\ClassGenerator.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\ILUtils.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Generate\MockClassBuilder.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IArgumentMutator.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IDynamicMock.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IMethodCallExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IMockedCallHandler.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\IPredicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\MethodCall.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\MethodSignature.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\AbstractPredicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\AndPredicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsAnything.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsCloseTo.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsEqual.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsEqualIgnoreCase.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsEqualIgnoreWhiteSpace.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsIn.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsMatch.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsNull.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\IsTypeOf.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\NotEqual.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\NotIn.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\NotNull.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\NotPredicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\OrPredicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\Predicates\Predicate.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\PredicateUtils.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationArray.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationArrayList.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationBool.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationCounter.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationString.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationStringQueue.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationType.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ExpectationValue.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="IExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="IListExpectation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="IMockObject.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="IVerifiable.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MockObject.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="NullObject.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="ReturnValue.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\AbstractStubMaker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\csUnitStubMaker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\IDynamicLinker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\Implementation.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\ImplementationFactory.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\IStubMaker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\MbUnitStubMaker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\NUnitStubMaker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\StubClassBuilder.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="TestFramework\SystemDynamicLinker.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Util\StringUtils.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Verifier.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="VerifyException.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework.Tests In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Framework.Tests Modified Files: DotNetMock.Framework.Tests.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Framework.Tests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework.Tests/DotNetMock.Framework.Tests.csproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DotNetMock.Framework.Tests.csproj 10 Jul 2004 13:23:09 -0000 1.8 --- DotNetMock.Framework.Tests.csproj 6 Jun 2006 03:06:51 -0000 1.9 *************** *** 1,160 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{32FE638B-E5ED-4886-8F1B-5E35AE6289A5}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Framework.Tests" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Framework.Tests" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "true" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock.Framework" ! Project = "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "nunit.framework" ! AssemblyName = "nunit.framework" ! HintPath = "..\lib\nunit.framework.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "ComponentModel\MockMarshalByValueComponentTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockCommandTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataParameterCollectionTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataParameterTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataReaderTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataSetTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDbConnectionTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDbDataAdapterTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockTransactionTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\Principal\MockIIdentityTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\Principal\MockIPrincipalTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,143 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{32FE638B-E5ED-4886-8F1B-5E35AE6289A5}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Framework.Tests</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Framework.Tests</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="nunit.framework"> ! <Name>nunit.framework</Name> ! <HintPath>..\lib\nunit.framework.dll</HintPath> ! </Reference> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock.Framework\DotNetMock.Framework.csproj"> ! <Name>DotNetMock.Framework</Name> ! <Project>{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="ComponentModel\MockMarshalByValueComponentTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockCommandTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataParameterCollectionTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataParameterTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataReaderTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataSetTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDbConnectionTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDbDataAdapterTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockTransactionTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\Principal\MockIIdentityTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\Principal\MockIPrincipalTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock/TestFramework Modified Files: IStubMaker.cs ImplementationFactory.cs NUnitStubMaker.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: NUnitStubMaker.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework/NUnitStubMaker.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NUnitStubMaker.cs 29 Jan 2005 09:13:32 -0000 1.2 --- NUnitStubMaker.cs 6 Jun 2006 03:06:52 -0000 1.3 *************** *** 1,48 **** #region License // Copyright (c) 2004 Choy Rim. All rights reserved. #endregion #region Imports ! using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; #endregion namespace DotNetMock.TestFramework { ! /// <summary> ! /// <see cref="IStubMaker"/> for NUnit. ! /// </summary> ! public class NUnitStubMaker : AbstractStubMaker ! { ! /// <summary> ! /// Create NUnit stub maker. ! /// </summary> ! /// <param name="providerAssembly">nunit.framework assembly</param> ! /// <param name="linker">reflection linkage provider</param> ! public NUnitStubMaker( ! Assembly providerAssembly, ! IDynamicLinker linker ! ) ! : base("NUnit.Framework.Assertion", providerAssembly, linker) ! { ! } ! /// <summary> ! /// Implement stub methods that forward to the ! /// NUnit.Framework.Assertion class. ! /// </summary> ! /// <param name="ilg"><see cref="ILGenerator"/> for the method ! /// we are stubbing</param> ! /// <param name="mi"><see cref="MethodInfo"/> for the method ! /// we are stubbing</param> ! public override void ImplementStubMethod(ILGenerator ilg, MethodInfo mi) ! { ! IList parameterTypes = GetParameterTypes(mi); ! for (int i = 0; i<parameterTypes.Count; ++i) ! { ! EmitLdarg(ilg, i+1); ! } ! EmitProviderCall(ilg, mi.Name, parameterTypes); ! } ! } ! } --- 1,53 ---- #region License + // Copyright (c) 2004 Choy Rim. All rights reserved. + #endregion + #region Imports ! using System.Collections; using System.Reflection; using System.Reflection.Emit; + #endregion namespace DotNetMock.TestFramework { ! /// <summary> ! /// <see cref="IStubMaker"/> for NUnit. ! /// </summary> ! public class NUnitStubMaker : AbstractStubMaker ! { ! /// <summary> ! /// Create NUnit stub maker. ! /// </summary> ! /// <param name="providerAssembly">nunit.framework assembly</param> ! /// <param name="linker">reflection linkage provider</param> ! public NUnitStubMaker( ! Assembly providerAssembly, ! IDynamicLinker linker ! ) ! : base("NUnit.Framework.Assertion", providerAssembly, linker) ! { ! } ! ! /// <summary> ! /// Implement stub methods that forward to the ! /// NUnit.Framework.Assertion class. ! /// </summary> ! /// <param name="ilg"><see cref="ILGenerator"/> for the method ! /// we are stubbing</param> ! /// <param name="mi"><see cref="MethodInfo"/> for the method ! /// we are stubbing</param> ! public override void ImplementStubMethod(ILGenerator ilg, MethodInfo mi) ! { ! IList parameterTypes = GetParameterTypes(mi); ! for (int i = 0; i < parameterTypes.Count; ++i) ! { ! EmitLdarg(ilg, i + 1); ! } ! EmitProviderCall(ilg, mi.Name, parameterTypes); ! } ! } ! } \ No newline at end of file Index: ImplementationFactory.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework/ImplementationFactory.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImplementationFactory.cs 5 Feb 2005 21:46:27 -0000 1.3 --- ImplementationFactory.cs 6 Jun 2006 03:06:52 -0000 1.4 *************** *** 1,6 **** --- 1,10 ---- #region License + // Copyright (c) 2004 Choy Rim. All rights reserved. + #endregion + #region Imports + using System; using System.Collections; *************** *** 12,125 **** namespace DotNetMock.TestFramework { ! /// <summary> ! /// Creates an implementation of <see cref="ITestFramework"/> ! /// based on settings in the environment. ! /// </summary> ! public class ImplementationFactory ! { ! const string STATIC_IMPLEMENTATION_ASSEMBLY_KEY = ! "DotNetMock_TestingAssembly"; ! const string STATIC_IMPLEMENTATION_TYPE_KEY = ! "DotNetMock_TestingComponent"; ! const string NUNIT_ASSEMBLY_NAME = "nunit.framework"; ! const string MBUNIT_ASSEMBLY_NAME = "MbUnit.Core"; ! const string CSUNIT_ASSEMBLY_NAME = "csUnit"; ! private IDictionary _env; ! private IDynamicLinker _linker; ! /// <summary> ! /// Create an implementation factory. ! /// </summary> ! /// <param name="env"><see cref="IDictionary"/> of environment ! /// variable name value entries</param> ! /// <param name="linker">provider of reflection services</param> ! public ImplementationFactory(IDictionary env, IDynamicLinker linker) ! { ! _env = env; ! _linker = linker; ! } ! /// <summary> ! /// Create an appropriate implementation for the given ! /// environment. ! /// </summary> ! /// <returns>a new <see cref="ITestFramework"/></returns> ! public ITestFramework NewImplementation() ! { ! Type implementationType = getStaticImplementationType(); ! if ( implementationType==null ) ! { ! implementationType = getDynamicImplementationType(); ! } ! if ( implementationType==null ) ! { ! throw new SystemException( ! "Cannot find an appropriate test framework implementation." ! ); ! } ! ITestFramework implementation = (ITestFramework) ! _linker.CreateInstance(implementationType); ! return implementation; ! } ! private Type getStaticImplementationType() ! { ! string assemblyName = (string) ! _env[STATIC_IMPLEMENTATION_ASSEMBLY_KEY]; ! if ( (assemblyName==null) || (assemblyName.Equals(String.Empty)) ) ! { ! return null; ! } ! string typeName = (string) ! _env[STATIC_IMPLEMENTATION_TYPE_KEY]; ! if ( (typeName==null) || (typeName.Equals(String.Empty)) ) ! { ! return null; ! } ! Assembly assembly = ! _linker.LoadAssembly(assemblyName); ! Type type = ! _linker.GetType(typeName, assembly); ! return type; ! } ! private Type getDynamicImplementationType() ! { ! StubClassMaker classMaker = new StubClassMaker(); ! IStubMaker stubMaker = null; ! Assembly assembly = null; ! if ( (assembly=_linker.LoadAssembly(NUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new NUnitStubMaker(assembly, _linker); ! } ! else if ( (assembly=_linker.LoadAssembly(MBUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new MbUnitStubMaker(assembly, _linker); ! } ! else if ( (assembly=_linker.LoadAssembly(CSUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new csUnitStubMaker(assembly, _linker); ! } ! else if ( (assembly=_linker.LoadAssemblyWithPartialName(NUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new NUnitStubMaker(assembly, _linker); ! } ! else if ( (assembly=_linker.LoadAssemblyWithPartialName(MBUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new MbUnitStubMaker(assembly, _linker); ! } ! else if ( (assembly=_linker.LoadAssemblyWithPartialName(CSUNIT_ASSEMBLY_NAME))!=null ) ! { ! stubMaker = new csUnitStubMaker(assembly, _linker); ! } ! else ! { ! return null; ! } ! Type stubClass = classMaker.MakeStubClass( ! typeof(ITestFramework), ! stubMaker ! ); ! return stubClass; ! } ! } ! } --- 16,133 ---- namespace DotNetMock.TestFramework { ! /// <summary> ! /// Creates an implementation of <see cref="ITestFramework"/> ! /// based on settings in the environment. ! /// </summary> ! public class ImplementationFactory ! { ! private const string STATIC_IMPLEMENTATION_ASSEMBLY_KEY = ! "DotNetMock_TestingAssembly"; ! private const string STATIC_IMPLEMENTATION_TYPE_KEY = ! "DotNetMock_TestingComponent"; ! private const string NUNIT_ASSEMBLY_NAME = "nunit.framework"; ! private const string MBUNIT_ASSEMBLY_NAME = "MbUnit.Core"; ! private const string CSUNIT_ASSEMBLY_NAME = "csUnit"; ! private IDictionary _env; ! private IDynamicLinker _linker; ! ! /// <summary> ! /// Create an implementation factory. ! /// </summary> ! /// <param name="env"><see cref="IDictionary"/> of environment ! /// variable name value entries</param> ! /// <param name="linker">provider of reflection services</param> ! public ImplementationFactory(IDictionary env, IDynamicLinker linker) ! { ! _env = env; ! _linker = linker; ! } ! ! /// <summary> ! /// Create an appropriate implementation for the given ! /// environment. ! /// </summary> ! /// <returns>a new <see cref="ITestFramework"/></returns> ! public ITestFramework NewImplementation() ! { ! Type implementationType = getStaticImplementationType(); ! if (implementationType == null) ! { ! implementationType = getDynamicImplementationType(); ! } ! if (implementationType == null) ! { ! throw new SystemException( ! "Cannot find an appropriate test framework implementation." ! ); ! } ! ITestFramework implementation = (ITestFramework) ! _linker.CreateInstance(implementationType); ! return implementation; ! } ! ! private Type getStaticImplementationType() ! { ! string assemblyName = (string) ! _env[STATIC_IMPLEMENTATION_ASSEMBLY_KEY]; ! if ((assemblyName == null) || (assemblyName.Equals(String.Empty))) ! { ! return null; ! } ! string typeName = (string) ! _env[STATIC_IMPLEMENTATION_TYPE_KEY]; ! if ((typeName == null) || (typeName.Equals(String.Empty))) ! { ! return null; ! } ! Assembly assembly = ! _linker.LoadAssembly(assemblyName); ! Type type = ! _linker.GetType(typeName, assembly); ! return type; ! } ! ! private Type getDynamicImplementationType() ! { ! StubClassMaker classMaker = new StubClassMaker(); ! IStubMaker stubMaker = null; ! Assembly assembly = null; ! if ((assembly = _linker.LoadAssembly(NUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new NUnitStubMaker(assembly, _linker); ! } ! else if ((assembly = _linker.LoadAssembly(MBUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new MbUnitStubMaker(assembly, _linker); ! } ! else if ((assembly = _linker.LoadAssembly(CSUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new csUnitStubMaker(assembly, _linker); ! } ! else if ((assembly = _linker.LoadAssemblyWithPartialName(NUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new NUnitStubMaker(assembly, _linker); ! } ! else if ((assembly = _linker.LoadAssemblyWithPartialName(MBUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new MbUnitStubMaker(assembly, _linker); ! } ! else if ((assembly = _linker.LoadAssemblyWithPartialName(CSUNIT_ASSEMBLY_NAME)) != null) ! { ! stubMaker = new csUnitStubMaker(assembly, _linker); ! } ! else ! { ! return null; ! } ! Type stubClass = classMaker.MakeStubClass( ! typeof (ITestFramework), ! stubMaker ! ); ! return stubClass; ! } ! } ! } \ No newline at end of file Index: IStubMaker.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework/IStubMaker.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IStubMaker.cs 29 Jan 2005 09:13:32 -0000 1.2 --- IStubMaker.cs 6 Jun 2006 03:06:52 -0000 1.3 *************** *** 1,27 **** #region License // Copyright (c) 2004 Choy Rim. All rights reserved. #endregion #region Imports ! using System; using System.Reflection; using System.Reflection.Emit; #endregion namespace DotNetMock.TestFramework { ! /// <summary> ! /// Interface for making method stubs for test framework providers. ! /// </summary> ! public interface IStubMaker ! { ! /// <summary> ! /// Implement one of the methods of the interface we are required ! /// to stub out. ! /// </summary> ! /// <param name="ilg"><see cref="ILGenerator"/> of the method ! /// on the dynamically generated type</param> ! /// <param name="mi"><see cref="MethodInfo"/> of the method ! /// on the interface we want to implement</param> ! void ImplementStubMethod(ILGenerator ilg, MethodInfo mi); ! } ! } --- 1,31 ---- #region License + // Copyright (c) 2004 Choy Rim. All rights reserved. + #endregion + #region Imports ! using System.Reflection; using System.Reflection.Emit; + #endregion namespace DotNetMock.TestFramework { ! /// <summary> ! /// Interface for making method stubs for test framework providers. ! /// </summary> ! public interface IStubMaker ! { ! /// <summary> ! /// Implement one of the methods of the interface we are required ! /// to stub out. ! /// </summary> ! /// <param name="ilg"><see cref="ILGenerator"/> of the method ! /// on the dynamically generated type</param> ! /// <param name="mi"><see cref="MethodInfo"/> of the method ! /// on the interface we want to implement</param> ! void ImplementStubMethod(ILGenerator ilg, MethodInfo mi); ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/ComponentModel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Framework/ComponentModel Modified Files: MockMarshalByValueComponent.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: MockMarshalByValueComponent.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/ComponentModel/MockMarshalByValueComponent.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MockMarshalByValueComponent.cs 5 Feb 2005 22:05:08 -0000 1.3 --- MockMarshalByValueComponent.cs 6 Jun 2006 03:06:51 -0000 1.4 *************** *** 2,160 **** using System.Collections; using System.ComponentModel; - using DotNetMock; namespace DotNetMock.Framework.ComponentModel { ! /// <summary> ! /// Base MockObject for remotable components that are marshaled by value. ! /// </summary> ! public class MockMarshalByValueComponent : MockObject, IComponent, IDisposable, IServiceProvider ! { ! private IContainer _expectedContainer = null; ! private bool _expectedDesignMode = false; ! private ISite _expectedSite = null; ! private Hashtable _serviceProviders = null; ! ! private ExpectationCounter _getServiceCalls = new ExpectationCounter( "MockMarshalByValueComponent.GetServiceCalls" ); ! /// <summary> ! /// Default COnstructor ! /// </summary> ! public MockMarshalByValueComponent() : base("MockMarshalByValueComponent") ! { ! _serviceProviders = new Hashtable(); ! } ! #region Mock Methods ! /// <summary> ! /// Sets the expected object that implements the IContainer interface that should be returned ! /// by the Container property. ! /// </summary> ! /// <param name="container">Expected Container</param> ! public void SetExpectedContainer( IContainer container ) ! { ! _expectedContainer = container; ! } ! /// <summary> ! /// Sets the expected value for the DesignMode property to return ! /// </summary> ! /// <param name="designMode">Expected Value</param> ! public void SetExpectedDesignMode( bool designMode ) ! { ! _expectedDesignMode = designMode; ! } ! /// <summary> ! /// Sets the expected object, that implements the ISite interface, to be returned via the Site property ! /// </summary> ! /// <param name="site">Expected Site</param> ! public void SetExpectedSite( ISite site ) ! { ! _expectedSite = site; ! } ! /// <summary> ! /// Sets the number of expected GetService() calls that are to be made on this object. ! /// </summary> ! /// <param name="count">Expected Count</param> ! public void SetExpectedGetServiceCalls( int count ) ! { ! _getServiceCalls.Expected = count; ! } ! /// <summary> ! /// Sets the expected service provider to be returned from GetService() when called for the given ! /// Type ! /// </summary> ! /// <param name="serviceProvider">Expected IServiceProvider</param> ! /// <param name="serviceType">Type to associate with the Expected IServiceProvider</param> ! public void SetExpectedServiceProvider( IServiceProvider serviceProvider , Type serviceType ) ! { ! _serviceProviders.Add( serviceType, serviceProvider ); ! } ! #endregion ! #region Public Properties ! /// <summary> ! /// Gets the container for the component. ! /// </summary> ! public IContainer Container ! { ! get { return _expectedContainer; } ! } ! /// <summary> ! /// Gets a value indicating whether the component is currently in design mode. ! /// </summary> ! public bool DesignMode ! { ! get ! { ! if ( _expectedSite == null ) ! { ! return false; ! } ! return _expectedDesignMode; ! } ! } ! #endregion ! #region Implementation of IComponent ! /// <summary> ! /// Adds an event handler to listen to the Disposed event on the component. ! /// </summary> ! public event System.EventHandler Disposed; ! /// <summary> ! /// Gets or sets the site of the component. ! /// </summary> ! public System.ComponentModel.ISite Site ! { ! get ! { ! return _expectedSite; ! } ! set ! { ! _expectedSite = value; ! } ! } ! #endregion ! #region Implementation of IDisposable ! /// <summary> ! /// Releases all resources used by the MarshalByValueComponent. ! /// </summary> ! public void Dispose() ! { ! Dispose( false ); ! } ! /// <summary> ! /// Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources. ! /// </summary> ! /// <param name="dispose">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> ! public void Dispose( bool dispose ) ! { ! Disposed( this, null ); ! } ! #endregion ! #region Implementation of IServiceProvider ! /// <summary> ! /// Gets the implementer of the IServiceProvider. ! /// </summary> ! /// <param name="serviceType">Gets the implementer of the IServiceProvider.</param> ! /// <returns>An Object that represents the implementer of the IServiceProvider.</returns> ! public object GetService(Type serviceType) ! { ! _getServiceCalls.Inc(); ! ! foreach ( Type expectedType in _serviceProviders.Keys ) ! { ! if ( expectedType.Equals( serviceType ) ) ! { ! return _serviceProviders[ expectedType ]; ! } ! } ! return null; ! } ! #endregion ! } ! } --- 2,169 ---- using System.Collections; using System.ComponentModel; namespace DotNetMock.Framework.ComponentModel { ! /// <summary> ! /// Base MockObject for remotable components that are marshaled by value. ! /// </summary> ! public class MockMarshalByValueComponent : MockObject, IComponent, IDisposable, IServiceProvider ! { ! private IContainer _expectedContainer = null; ! private bool _expectedDesignMode = false; ! private ISite _expectedSite = null; ! private Hashtable _serviceProviders = null; ! private ExpectationCounter _getServiceCalls = ! new ExpectationCounter("MockMarshalByValueComponent.GetServiceCalls"); ! /// <summary> ! /// Default COnstructor ! /// </summary> ! public MockMarshalByValueComponent() : base("MockMarshalByValueComponent") ! { ! _serviceProviders = new Hashtable(); ! } ! #region Mock Methods ! /// <summary> ! /// Sets the expected object that implements the IContainer interface that should be returned ! /// by the Container property. ! /// </summary> ! /// <param name="container">Expected Container</param> ! public void SetExpectedContainer(IContainer container) ! { ! _expectedContainer = container; ! } ! /// <summary> ! /// Sets the expected value for the DesignMode property to return ! /// </summary> ! /// <param name="designMode">Expected Value</param> ! public void SetExpectedDesignMode(bool designMode) ! { ! _expectedDesignMode = designMode; ! } ! /// <summary> ! /// Sets the expected object, that implements the ISite interface, to be returned via the Site property ! /// </summary> ! /// <param name="site">Expected Site</param> ! public void SetExpectedSite(ISite site) ! { ! _expectedSite = site; ! } ! /// <summary> ! /// Sets the number of expected GetService() calls that are to be made on this object. ! /// </summary> ! /// <param name="count">Expected Count</param> ! public void SetExpectedGetServiceCalls(int count) ! { ! _getServiceCalls.Expected = count; ! } ! /// <summary> ! /// Sets the expected service provider to be returned from GetService() when called for the given ! /// Type ! /// </summary> ! /// <param name="serviceProvider">Expected IServiceProvider</param> ! /// <param name="serviceType">Type to associate with the Expected IServiceProvider</param> ! public void SetExpectedServiceProvider(IServiceProvider serviceProvider, Type serviceType) ! { ! _serviceProviders.Add(serviceType, serviceProvider); ! } ! ! #endregion ! ! #region Public Properties ! ! /// <summary> ! /// Gets the container for the component. ! /// </summary> ! public IContainer Container ! { ! get { return _expectedContainer; } ! } ! ! /// <summary> ! /// Gets a value indicating whether the component is currently in design mode. ! /// </summary> ! public bool DesignMode ! { ! get ! { ! if (_expectedSite == null) ! { ! return false; ! } ! return _expectedDesignMode; ! } ! } ! ! #endregion ! ! #region Implementation of IComponent ! ! /// <summary> ! /// Adds an event handler to listen to the Disposed event on the component. ! /// </summary> ! public event EventHandler Disposed; ! ! /// <summary> ! /// Gets or sets the site of the component. ! /// </summary> ! public ISite Site ! { ! get { return _expectedSite; } ! set { _expectedSite = value; } ! } ! ! #endregion ! ! #region Implementation of IDisposable ! ! /// <summary> ! /// Releases all resources used by the MarshalByValueComponent. ! /// </summary> ! public void Dispose() ! { ! Dispose(false); ! } ! ! /// <summary> ! /// Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources. ! /// </summary> ! /// <param name="dispose">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> ! public void Dispose(bool dispose) ! { ! Disposed(this, null); ! } ! ! #endregion ! ! #region Implementation of IServiceProvider ! ! /// <summary> ! /// Gets the implementer of the IServiceProvider. ! /// </summary> ! /// <param name="serviceType">Gets the implementer of the IServiceProvider.</param> ! /// <returns>An Object that represents the implementer of the IServiceProvider.</returns> ! public object GetService(Type serviceType) ! { ! _getServiceCalls.Inc(); ! ! foreach (Type expectedType in _serviceProviders.Keys) ! { ! if (expectedType.Equals(serviceType)) ! { ! return _serviceProviders[expectedType]; ! } ! } ! return null; ! } ! ! #endregion ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.NUnitTests/CustomExpectation In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Examples.NUnitTests/CustomExpectation Modified Files: ExpectationPersonTests.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: ExpectationPersonTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.NUnitTests/CustomExpectation/ExpectationPersonTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExpectationPersonTests.cs 11 Feb 2005 05:33:36 -0000 1.2 --- ExpectationPersonTests.cs 6 Jun 2006 03:06:51 -0000 1.3 *************** *** 1,81 **** #region License // Copyright (c) 2005 Griffin Caprio & Choy Rim. All rights reserved. #endregion #region Imports - using System; using NUnit.Framework; #endregion namespace DotNetMock.Examples.CustomExpectation { ! [TestFixture] ! public class ExpectationPersonTests ! { ! private ExpectationPerson _expectationPerson = null; ! private Person _actualPerson = null; ! private Person _expectedPerson = null; ! [SetUp] ! public void Init() ! { ! _expectationPerson = new ExpectationPerson( "ExpectationPersonTests.ExpectationPerson" ); ! _actualPerson = new Person( "Bobby Fake", 35 ); ! _expectedPerson = new Person( "Bobby Fake", 35 ); ! } ! [TearDown] ! public void Destroy() ! { ! _expectationPerson = null; ! _actualPerson = null; ! _expectedPerson = null; ! } ! [Test] ! public void ExpectedPersonEqual() ! { ! _expectationPerson.Expected = _expectedPerson; ! Assertion.Assert( _expectationPerson.HasExpectations ); ! _expectationPerson.Actual = _actualPerson; ! _expectationPerson.Verify(); ! } ! [Test] ! public void ExpectedPersonFailure() ! { ! Person thirdWheel = new Person( "Bob De Niro", 56 ); ! _expectationPerson.Actual = _actualPerson; ! _expectationPerson.Expected = thirdWheel; ! try ! { ! _expectationPerson.Verify(); ! Assertion.Fail( "Should throw exception" ); ! } ! catch ! { ! } ! _expectationPerson.Expected = _expectedPerson; ! _expectationPerson.Verify(); ! } ! [Test] ! public void ExpectationPersonActual() ! { ! Assertion.AssertNull( "Actual person", _expectationPerson.Actual ); ! _expectationPerson.Actual = _actualPerson; ! Assertion.AssertNotNull( "Actual Person not null", _expectationPerson.Actual ); ! Assertion.AssertEquals( "People not equal", _actualPerson, _expectationPerson.Actual ); ! _expectationPerson.ClearActual(); ! Assertion.AssertNull( "Actual person null", _expectationPerson.Actual ); ! } ! [Test] ! public void ExpectationPersonExpected() ! { ! Assertion.AssertNull( "Expected person", _expectationPerson.Expected ); ! _expectationPerson.Expected = _expectedPerson; ! Assertion.AssertNotNull( "Expected Person not null", _expectationPerson.Expected ); ! Assertion.AssertEquals( "People not equal", _expectedPerson, _expectationPerson.Expected ); ! _expectationPerson.ClearExpected(); ! Assertion.AssertNull( "Expected person null", _expectationPerson.Expected ); ! } ! } ! } --- 1,88 ---- #region License + // Copyright (c) 2005 Griffin Caprio & Choy Rim. All rights reserved. + #endregion + #region Imports using NUnit.Framework; + #endregion namespace DotNetMock.Examples.CustomExpectation { ! [TestFixture] ! public class ExpectationPersonTests ! { ! private ExpectationPerson _expectationPerson = null; ! private Person _actualPerson = null; ! private Person _expectedPerson = null; ! [SetUp] ! public void Init() ! { ! _expectationPerson = new ExpectationPerson("ExpectationPersonTests.ExpectationPerson"); ! _actualPerson = new Person("Bobby Fake", 35); ! _expectedPerson = new Person("Bobby Fake", 35); ! } ! [TearDown] ! public void Destroy() ! { ! _expectationPerson = null; ! _actualPerson = null; ! _expectedPerson = null; ! } ! [Test] ! public void ExpectedPersonEqual() ! { ! _expectationPerson.Expected = _expectedPerson; ! Assertion.Assert(_expectationPerson.HasExpectations); ! _expectationPerson.Actual = _actualPerson; ! _expectationPerson.Verify(); ! } ! ! [Test] ! public void ExpectedPersonFailure() ! { ! Person thirdWheel = new Person("Bob De Niro", 56); ! _expectationPerson.Actual = _actualPerson; ! _expectationPerson.Expected = thirdWheel; ! ! try ! { ! _expectationPerson.Verify(); ! Assertion.Fail("Should throw exception"); ! } ! catch ! { ! } ! _expectationPerson.Expected = _expectedPerson; ! _expectationPerson.Verify(); ! } ! ! [Test] ! public void ExpectationPersonActual() ! { ! Assertion.AssertNull("Actual person", _expectationPerson.Actual); ! _expectationPerson.Actual = _actualPerson; ! Assertion.AssertNotNull("Actual Person not null", _expectationPerson.Actual); ! Assertion.AssertEquals("People not equal", _actualPerson, _expectationPerson.Actual); ! _expectationPerson.ClearActual(); ! Assertion.AssertNull("Actual person null", _expectationPerson.Actual); ! } ! ! [Test] ! public void ExpectationPersonExpected() ! { ! Assertion.AssertNull("Expected person", _expectationPerson.Expected); ! _expectationPerson.Expected = _expectedPerson; ! Assertion.AssertNotNull("Expected Person not null", _expectationPerson.Expected); ! Assertion.AssertEquals("People not equal", _expectedPerson, _expectationPerson.Expected); ! _expectationPerson.ClearExpected(); ! Assertion.AssertNull("Expected person null", _expectationPerson.Expected); ! } ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Framework Modified Files: DotNetMock.Framework.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Framework.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/DotNetMock.Framework.csproj,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** DotNetMock.Framework.csproj 12 Feb 2005 09:10:09 -0000 1.18 --- DotNetMock.Framework.csproj 6 Jun 2006 03:06:51 -0000 1.19 *************** *** 1,155 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Framework" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Framework" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "DotNetMock.Framework.xml" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "true" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "DotNetMock.Framework.xml" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "ComponentModel\MockMarshalByValueComponent.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockCommand.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataParameter.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataParameterCollection.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataReader.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataSet.cs" ! SubType = "Component" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDataSet.resx" ! DependentUpon = "MockDataSet.cs" ! BuildAction = "EmbeddedResource" ! /> ! <File ! RelPath = "Data\MockDbConnection.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockDbDataAdapter.cs" ! SubType = "Component" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Data\MockTransaction.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\Principal\MockIIdentity.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\Principal\MockIPrincipal.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,135 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Framework</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Framework</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile>DotNetMock.Framework.xml</DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile>DotNetMock.Framework.xml</DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="ComponentModel\MockMarshalByValueComponent.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockCommand.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataParameter.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataParameterCollection.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataReader.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDataSet.cs"> ! <SubType>Component</SubType> ! </Compile> ! <Compile Include="Data\MockDbConnection.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Data\MockDbDataAdapter.cs"> ! <SubType>Component</SubType> ! </Compile> ! <Compile Include="Data\MockTransaction.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\Principal\MockIIdentity.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\Principal\MockIPrincipal.cs"> ! <SubType>Code</SubType> ! </Compile> ! <EmbeddedResource Include="Data\MockDataSet.resx"> ! <DependentUpon>MockDataSet.cs</DependentUpon> ! </EmbeddedResource> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock/Core Modified Files: ITestFramework.cs Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: ITestFramework.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Core/ITestFramework.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ITestFramework.cs 5 Feb 2005 21:46:27 -0000 1.1 --- ITestFramework.cs 6 Jun 2006 03:06:52 -0000 1.2 *************** *** 1,69 **** - using System; - namespace DotNetMock.Core { ! /// <summary> ! /// Interface to encapsulate specific testing framework from DotNetMock. ! /// </summary> ! public interface ITestFramework ! { ! #region AssertEquals methods ! /// <summary> ! /// Asserts that two objects are equal. If the objects are not equal the assertions fails with the ! /// given message. ! /// </summary> ! void AssertEquals( string message, object expectedObject, object actualObject ); ! /// <summary> ! /// Asserts that two objects are equal. If the objects are not equal the assertions fails. ! /// </summary> ! void AssertEquals( object expectedObject, object actualObject ); ! #endregion ! #region Fail methods ! /// <summary> ! /// Fails a test with no message ! /// </summary> ! void Fail(); ! /// <summary> ! /// Fails a test with the specified message ! /// </summary> ! void Fail( string message ); ! #endregion ! #region Assert methods ! /// <summary> ! /// Asserts that a given condition is true. If the condition is not true, the assertion fails ! /// with the given message. ! /// </summary> ! void Assert( string message, bool assertion ); ! /// <summary> ! /// Asserts that a given condition is true. If the condition is not true, the assertion fails. ! /// </summary> ! void Assert( bool assertion ); ! #endregion ! #region AssertNull methods ! /// <summary> ! /// Asserts that an object is null. If the object is not null, the assertion fails with the given ! /// message. ! /// </summary> ! void AssertNull( string message, object assertion ); ! /// <summary> ! /// Asserts that an object is null. If the object is not null, the assertion fails. ! /// </summary> ! void AssertNull( object assertion ); ! #endregion ! #region AssertNotNull methods ! /// <summary> ! /// Asserts that an object is not null. If the object is null, the assertion fails with the given ! /// message. ! /// </summary> ! void AssertNotNull( string message, object assertion ); ! /// <summary> ! /// Asserts that an object is not null. If the object is null, the assertion fails. ! /// </summary> ! void AssertNotNull( object assertion ); ! #endregion ! } ! } --- 1,82 ---- namespace DotNetMock.Core { ! /// <summary> ! /// Interface to encapsulate specific testing framework from DotNetMock. ! /// </summary> ! public interface ITestFramework ! { ! #region AssertEquals methods ! /// <summary> ! /// Asserts that two objects are equal. If the objects are not equal the assertions fails with the ! /// given message. ! /// </summary> ! void AssertEquals(string message, object expectedObject, object actualObject); ! /// <summary> ! /// Asserts that two objects are equal. If the objects are not equal the assertions fails. ! /// </summary> ! void AssertEquals(object expectedObject, object actualObject); ! #endregion ! #region Fail methods ! ! /// <summary> ! /// Fails a test with no message ! /// </summary> ! void Fail(); ! ! /// <summary> ! /// Fails a test with the specified message ! /// </summary> ! void Fail(string message); ! ! #endregion ! ! #region Assert methods ! ! /// <summary> ! /// Asserts that a given condition is true. If the condition is not true, the assertion fails ! /// with the given message. ! /// </summary> ! void Assert(string message, bool assertion); ! ! /// <summary> ! /// Asserts that a given condition is true. If the condition is not true, the assertion fails. ! /// </summary> ! void Assert(bool assertion); ! ! #endregion ! ! #region AssertNull methods ! ! /// <summary> ! /// Asserts that an object is null. If the object is not null, the assertion fails with the given ! /// message. ! /// </summary> ! void AssertNull(string message, object assertion); ! ! /// <summary> ! /// Asserts that an object is null. If the object is not null, the assertion fails. ! /// </summary> ! void AssertNull(object assertion); ! ! #endregion ! ! #region AssertNotNull methods ! ! /// <summary> ! /// Asserts that an object is not null. If the object is null, the assertion fails with the given ! /// message. ! /// </summary> ! void AssertNotNull(string message, object assertion); ! ! /// <summary> ! /// Asserts that an object is not null. If the object is null, the assertion fails. ! /// </summary> ! void AssertNotNull(object assertion); ! ! #endregion ! } ! } \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-06-06 03:07:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.NUnitTests In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6076/DotNetMock.Examples.NUnitTests Modified Files: DotNetMock.Examples.NUnitTests.csproj Log Message: - Initial conversion to .NET 2.0 and VIsual Studio 2005 Index: DotNetMock.Examples.NUnitTests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples.NUnitTests/DotNetMock.Examples.NUnitTests.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DotNetMock.Examples.NUnitTests.csproj 9 Feb 2005 06:34:27 -0000 1.1 --- DotNetMock.Examples.NUnitTests.csproj 6 Jun 2006 03:06:51 -0000 1.2 *************** *** 1,140 **** ! <VisualStudioProject> ! <CSHARP ! ProjectType = "Local" ! ProductVersion = "7.10.3077" ! SchemaVersion = "2.0" ! ProjectGuid = "{760B53F4-0E0F-41A0-94ED-9B8691833A70}" ! > ! <Build> ! <Settings ! ApplicationIcon = "" ! AssemblyKeyContainerName = "" ! AssemblyName = "DotNetMock.Examples.NUnitTests" ! AssemblyOriginatorKeyFile = "" ! DefaultClientScript = "JScript" ! DefaultHTMLPageLayout = "Grid" ! DefaultTargetSchema = "IE50" ! DelaySign = "false" ! OutputType = "Library" ! PreBuildEvent = "" ! PostBuildEvent = "" ! RootNamespace = "DotNetMock.Examples.NUnitTests" ! RunPostBuildEvent = "OnBuildSuccess" ! StartupObject = "" ! > ! <Config ! Name = "Debug" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" ! DebugSymbols = "true" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "false" ! OutputPath = "bin\Debug\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! <Config ! Name = "Release" ! AllowUnsafeBlocks = "false" ! BaseAddress = "285212672" ! CheckForOverflowUnderflow = "false" ! ConfigurationOverrideFile = "" ! DefineConstants = "TRACE" ! DocumentationFile = "" ! DebugSymbols = "false" ! FileAlignment = "4096" ! IncrementalBuild = "false" ! NoStdLib = "false" ! NoWarn = "" ! Optimize = "true" ! OutputPath = "bin\Release\" ! RegisterForComInterop = "false" ! RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" ! WarningLevel = "4" ! /> ! </Settings> ! <References> ! <Reference ! Name = "System" ! AssemblyName = "System" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" ! /> ! <Reference ! Name = "System.Data" ! AssemblyName = "System.Data" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" ! /> ! <Reference ! Name = "System.XML" ! AssemblyName = "System.Xml" ! HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" ! /> ! <Reference ! Name = "DotNetMock.Examples" ! Project = "{80B98B32-57CB-4989-B506-0F2B0AD94DBA}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "nunit.framework" ! AssemblyName = "nunit.framework" ! HintPath = "..\lib-ext\NUnit-2.2\nunit.framework.dll" ! /> ! <Reference ! Name = "DotNetMock" ! Project = "{1AD0CD00-16FA-4456-B2ED-A47406957228}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! <Reference ! Name = "DotNetMock.Framework" ! Project = "{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ! /> ! </References> ! </Build> ! <Files> ! <Include> ! <File ! RelPath = "AssemblyInfo.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "CustomExpectation\ExpectationPersonTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Dynamic\WeatherTest.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "MailingList\MailingListTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Mainframe\CustomerNumberCollectorTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Security\SensitiveClassTests.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! </Include> ! </Files> ! </CSHARP> ! </VisualStudioProject> ! --- 1,133 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ! <PropertyGroup> ! <ProjectType>Local</ProjectType> ! <ProductVersion>8.0.50727</ProductVersion> ! <SchemaVersion>2.0</SchemaVersion> ! <ProjectGuid>{760B53F4-0E0F-41A0-94ED-9B8691833A70}</ProjectGuid> ! <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> ! <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ! <ApplicationIcon> ! </ApplicationIcon> ! <AssemblyKeyContainerName> ! </AssemblyKeyContainerName> ! <AssemblyName>DotNetMock.Examples.NUnitTests</AssemblyName> ! <AssemblyOriginatorKeyFile> ! </AssemblyOriginatorKeyFile> ! <DefaultClientScript>JScript</DefaultClientScript> ! <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> ! <DefaultTargetSchema>IE50</DefaultTargetSchema> ! <DelaySign>false</DelaySign> ! <OutputType>Library</OutputType> ! <RootNamespace>DotNetMock.Examples.NUnitTests</RootNamespace> ! <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> ! <StartupObject> ! </StartupObject> ! <FileUpgradeFlags> ! </FileUpgradeFlags> ! <UpgradeBackupLocation> ! </UpgradeBackupLocation> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ! <OutputPath>bin\Debug\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>DEBUG;TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>true</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>false</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>full</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ! <OutputPath>bin\Release\</OutputPath> ! <AllowUnsafeBlocks>false</AllowUnsafeBlocks> ! <BaseAddress>285212672</BaseAddress> ! <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> ! <ConfigurationOverrideFile> ! </ConfigurationOverrideFile> ! <DefineConstants>TRACE</DefineConstants> ! <DocumentationFile> ! </DocumentationFile> ! <DebugSymbols>false</DebugSymbols> ! <FileAlignment>4096</FileAlignment> ! <NoStdLib>false</NoStdLib> ! <NoWarn> ! </NoWarn> ! <Optimize>true</Optimize> ! <RegisterForComInterop>false</RegisterForComInterop> ! <RemoveIntegerChecks>false</RemoveIntegerChecks> ! <TreatWarningsAsErrors>false</TreatWarningsAsErrors> ! <WarningLevel>4</WarningLevel> ! <DebugType>none</DebugType> ! <ErrorReport>prompt</ErrorReport> ! </PropertyGroup> ! <ItemGroup> ! <Reference Include="nunit.framework"> ! <Name>nunit.framework</Name> ! <HintPath>..\lib-ext\NUnit-2.2\nunit.framework.dll</HintPath> ! </Reference> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> ! <Reference Include="System.Data"> ! <Name>System.Data</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> ! <ProjectReference Include="..\DotNetMock.Examples\DotNetMock.Examples.csproj"> ! <Name>DotNetMock.Examples</Name> ! <Project>{80B98B32-57CB-4989-B506-0F2B0AD94DBA}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! <ProjectReference Include="..\DotNetMock.Framework\DotNetMock.Framework.csproj"> ! <Name>DotNetMock.Framework</Name> ! <Project>{514DAB7F-4A05-4343-9BF5-2C3DC60A431D}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! <ProjectReference Include="..\DotNetMock\DotNetMock.csproj"> ! <Name>DotNetMock</Name> ! <Project>{1AD0CD00-16FA-4456-B2ED-A47406957228}</Project> ! <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> ! </ProjectReference> ! </ItemGroup> ! <ItemGroup> ! <Compile Include="AssemblyInfo.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="CustomExpectation\ExpectationPersonTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Dynamic\WeatherTest.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="MailingList\MailingListTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Mainframe\CustomerNumberCollectorTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! <Compile Include="Security\SensitiveClassTests.cs"> ! <SubType>Code</SubType> ! </Compile> ! </ItemGroup> ! <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <PropertyGroup> ! <PreBuildEvent> ! </PreBuildEvent> ! <PostBuildEvent> ! </PostBuildEvent> ! </PropertyGroup> ! </Project> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2006-03-10 04:57:28
|
Update of /cvsroot/dotnetmock/dotnetmock/docs/ReleaseNotes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20212/docs/ReleaseNotes Added Files: ReleaseNotes-0.8.0.txt Log Message: --- NEW FILE: ReleaseNotes-0.8.0.txt --- Release Notes 0.8.0 Thanks to Niklas Dahlman for contributing many of the bug fixes found in this release. -Griffin |
From: Griffin C. <gc...@us...> - 2006-03-10 02:24:13
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5695 Modified Files: DotNetMock.build Log Message: - incremented version number to 0.8.0 - added change log for this release - moved mockobject & templates in line. Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.build,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** DotNetMock.build 25 Apr 2005 03:53:10 -0000 1.27 --- DotNetMock.build 10 Mar 2006 02:24:09 -0000 1.28 *************** *** 6,10 **** <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003" /> <property name="project.name" value="DotNetMock" /> ! <property name="version" value="0.7.6" /> <property name="build.dir" value="build/" /> <property name="dist.dir" value="dist" /> --- 6,10 ---- <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003" /> <property name="project.name" value="DotNetMock" /> ! <property name="version" value="0.8.0" /> <property name="build.dir" value="build/" /> <property name="dist.dir" value="dist" /> |
From: Griffin C. <gc...@us...> - 2006-03-10 02:24:13
|
Update of /cvsroot/dotnetmock/dotnetmock/VisualStudioTemplates/VC#Wizards/CSharpAddMockObject/Templates/1033 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5695/VisualStudioTemplates/VC#Wizards/CSharpAddMockObject/Templates/1033 Modified Files: NewMockObjectFile.cs Log Message: - incremented version number to 0.8.0 - added change log for this release - moved mockobject & templates in line. Index: NewMockObjectFile.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/VisualStudioTemplates/VC#Wizards/CSharpAddMockObject/Templates/1033/NewMockObjectFile.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewMockObjectFile.cs 26 Feb 2003 17:15:58 -0000 1.1 --- NewMockObjectFile.cs 10 Mar 2006 02:24:09 -0000 1.2 *************** *** 11,15 **** public [!output SAFE_CLASS_NAME]() { ! this.name = "[!output SAFE_CLASS_NAME]"; } } --- 11,15 ---- public [!output SAFE_CLASS_NAME]() { ! this.MockName = "[!output SAFE_CLASS_NAME]"; } } |
From: Griffin C. <gc...@us...> - 2006-03-10 02:24:13
|
Update of /cvsroot/dotnetmock/dotnetmock/docs/ChangeLogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5695/docs/ChangeLogs Added Files: Changes-0.8.0.txt Log Message: - incremented version number to 0.8.0 - added change log for this release - moved mockobject & templates in line. --- NEW FILE: Changes-0.8.0.txt --- - Fixed bugs 1189946, 1238868 and 1175299 - Assorted updates. |
From: Griffin C. <gc...@us...> - 2006-03-10 02:24:13
|
Update of /cvsroot/dotnetmock/dotnetmock/VisualStudioTemplates2003/VC#Wizards/CSharpAddMockObject/Templates/1033 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5695/VisualStudioTemplates2003/VC#Wizards/CSharpAddMockObject/Templates/1033 Modified Files: NewMockObjectFile.cs Log Message: - incremented version number to 0.8.0 - added change log for this release - moved mockobject & templates in line. Index: NewMockObjectFile.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/VisualStudioTemplates2003/VC#Wizards/CSharpAddMockObject/Templates/1033/NewMockObjectFile.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewMockObjectFile.cs 21 Mar 2004 22:16:43 -0000 1.1 --- NewMockObjectFile.cs 10 Mar 2006 02:24:09 -0000 1.2 *************** *** 11,15 **** public [!output SAFE_CLASS_NAME]() { ! this.name = "[!output SAFE_CLASS_NAME]"; } } --- 11,15 ---- public [!output SAFE_CLASS_NAME]() { ! this.MockName = "[!output SAFE_CLASS_NAME]"; } } |
From: Griffin C. <gc...@us...> - 2006-03-06 02:25:07
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10746/DotNetMock.Tests/Dynamic/Generate Modified Files: ClassGeneratorTests.cs Log Message: - Merged in changes from Niklas Index: ClassGeneratorTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate/ClassGeneratorTests.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ClassGeneratorTests.cs 11 May 2005 04:08:31 -0000 1.19 --- ClassGeneratorTests.cs 6 Mar 2006 02:24:57 -0000 1.20 *************** *** 97,101 **** thingy = ( IThingy )cg.Generate( typeof ( IThingy ), mock ); } ! private interface IDirectionalParameters { void DoWithInParameters( int a, string b ); --- 97,101 ---- thingy = ( IThingy )cg.Generate( typeof ( IThingy ), mock ); } ! public interface IDirectionalParameters { void DoWithInParameters( int a, string b ); *************** *** 133,142 **** private MethodInfo _methodInfo = null; } - [Test] public void ReadPropertyGetIsSpecialName() - { - Type mot = thingy.GetType(); - MethodInfo get_ReadProperty = mot.GetMethod("get_ReadProperty"); - Assert.IsTrue(get_ReadProperty.IsSpecialName); - } [Test] public void SaveGeneratedAssembly() --- 133,136 ---- |
From: Griffin C. <gc...@us...> - 2006-03-06 02:25:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10746/DotNetMock.Tests/Util Modified Files: StringUtilsTests.cs Log Message: - Merged in changes from Niklas Index: StringUtilsTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Util/StringUtilsTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StringUtilsTests.cs 20 Feb 2005 09:26:50 -0000 1.1 --- StringUtilsTests.cs 6 Mar 2006 02:24:57 -0000 1.2 *************** *** 27,35 **** ); Assert.AreEqual( ! "3.4", StringUtils.FormatScalar(3.4) ); Assert.AreEqual( ! "[1, 'two', 3.4]", StringUtils.FormatScalar(new object[] { 1, "two", 3.4 }) ); --- 27,35 ---- ); Assert.AreEqual( ! ""+3.4+"", StringUtils.FormatScalar(3.4) ); Assert.AreEqual( ! "[1, 'two', "+3.4+"]", StringUtils.FormatScalar(new object[] { 1, "two", 3.4 }) ); *************** *** 38,42 **** { Assert.AreEqual( ! "1, 'two', 3.4", StringUtils.FormatArray(1, "two", 3.4) ); --- 38,42 ---- { Assert.AreEqual( ! "1, 'two', "+3.4+"", StringUtils.FormatArray(1, "two", 3.4) ); *************** *** 49,53 **** hash["c"]=3.4; Assert.AreEqual( ! "a=1, b='two', c=3.4", StringUtils.FormatCollection(hash) ); --- 49,53 ---- hash["c"]=3.4; Assert.AreEqual( ! "a=1, b='two', c="+3.4+"", StringUtils.FormatCollection(hash) ); *************** *** 60,64 **** list.Add(3.4); Assert.AreEqual( ! "1, 'two', 3.4", StringUtils.FormatCollection(list) ); --- 60,64 ---- list.Add(3.4); Assert.AreEqual( ! "1, 'two', "+3.4+"", StringUtils.FormatCollection(list) ); |
From: Griffin C. <gc...@us...> - 2006-03-06 02:25:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10746/DotNetMock/Dynamic Modified Files: DynamicMock.cs DynamicOrderedMock.cs ExpectationMethod.cs IMethodCallExpectation.cs Log Message: - Merged in changes from Niklas Index: IMethodCallExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/IMethodCallExpectation.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IMethodCallExpectation.cs 8 Apr 2005 00:05:09 -0000 1.2 --- IMethodCallExpectation.cs 6 Mar 2006 02:24:58 -0000 1.3 *************** *** 18,21 **** --- 18,26 ---- string ExpectedMethodName { get; } + /// <summary> + /// The type of expectation, call or no call + /// </summary> + ExpectationMethodType ExpectationType { get; } + /// <summary> /// Check actual incoming method call and return expected outgoing response. Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DynamicOrderedMock.cs 4 Mar 2005 00:18:42 -0000 1.12 --- DynamicOrderedMock.cs 6 Mar 2006 02:24:58 -0000 1.13 *************** *** 4,8 **** #region Imports using System; - using System.Reflection; using System.Collections; --- 4,7 ---- *************** *** 39,45 **** public override void Verify() { ! if( expectations.Count!=0 ) { ! Assertion.Fail( "Unfinished scenario: method " + ((IMethodCallExpectation)expectations[0]).ExpectedMethodName + "() wasn't called"); ! } } /// <summary> --- 38,52 ---- public override void Verify() { ! if (expectations.Count > 0) ! { ! foreach(ExpectationMethod em in expectations) ! { ! if (em.ExpectationType != ExpectationMethodType.NoCall) ! { ! Assertion.Fail("Unfinished scenario: method " + em.ExpectedMethodName + "() wasn't called"); ! } ! ! } ! } } /// <summary> *************** *** 49,52 **** --- 56,70 ---- protected override void addExpectation(IMethodCallExpectation e) { + // prevent adding a Call expectation after a NoCall expectation + if (e.ExpectationType == ExpectationMethodType.Call) + { + foreach (ExpectationMethod em in expectations) + { + if (em.ExpectationType == ExpectationMethodType.NoCall) + { + Assertion.Fail("ExpectNoCall must be last on a DynamicOrderedMock"); + } + } + } expectations.Add(e); } Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** DynamicMock.cs 8 Apr 2005 02:57:09 -0000 1.22 --- DynamicMock.cs 6 Mar 2006 02:24:58 -0000 1.23 *************** *** 117,121 **** } /// <summary> ! /// Verifies the this mock object. /// </summary> public virtual void Verify() --- 117,121 ---- } /// <summary> ! /// Verifies this mock object. /// </summary> public virtual void Verify() *************** *** 126,130 **** if ( expectationsList.Count > 0 ) { ! throw new AssertionException( expectationsList.Count + " more call(s) were expected for " + key); } } --- 126,136 ---- if ( expectationsList.Count > 0 ) { ! foreach (ExpectationMethod em in expectationsList) ! { ! if (em.ExpectationType != ExpectationMethodType.NoCall) ! { ! throw new AssertionException(expectationsList.Count + " more call(s) were expected for " + key); ! } ! } } } *************** *** 153,157 **** public virtual void ExpectNoCall(string methodName) { ! addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."))); } /// <summary> --- 159,163 ---- public virtual void ExpectNoCall(string methodName) { ! addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."), ExpectationMethodType.NoCall)); } /// <summary> Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ExpectationMethod.cs 11 May 2005 05:22:22 -0000 1.26 --- ExpectationMethod.cs 6 Mar 2006 02:24:58 -0000 1.27 *************** *** 14,17 **** --- 14,33 ---- namespace DotNetMock.Dynamic { + /// <summary> + /// The kind of expectation on the method + /// </summary> + public enum ExpectationMethodType + { + /// <summary> + /// Expect the method to be called + /// </summary> + Call, + /// <summary> + /// Expect the method to not be called + /// </summary> + NoCall + }; + + /// <summary> /// Expected method call used for building dynamic mocks *************** *** 35,38 **** --- 51,59 ---- /// </summary> private Exception _expectedException; + /// <summary> + /// The type of expectation, call or no call + /// </summary> + private ExpectationMethodType _expectationType; + /// <summary> /// Actual <see cref="MethodCall"/>. *************** *** 70,102 **** { } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! /// <param name="argumentExpectations">Expectations on the arguments</param> ! /// <param name="expectedException">Exception to throw when called.</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations, ! Exception expectedException ! ) ! { ! _expectedMethodName = methodName; ! _argumentExpectations = argumentExpectations; ! _expectedReturnValue = returnValue; ! _expectedException = expectedException; ! } ! /// <summary> ! /// Expected Method Name ! /// </summary> ! public string ExpectedMethodName ! { ! get ! { ! return _expectedMethodName; ! } ! } /// <summary> /// Expected Return Value --- 91,153 ---- { } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! /// <param name="argumentExpectations">Expectations on the arguments</param> ! /// <param name="expectedException">Exception to throw when called.</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations, ! Exception expectedException ! ) ! : this(methodName, returnValue, argumentExpectations, expectedException, ExpectationMethodType.Call) ! { ! ! } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="methodName">Method name to expect</param> ! /// <param name="returnValue">return value when expectation is called</param> ! /// <param name="argumentExpectations">Expectations on the arguments</param> ! /// <param name="expectedException">Exception to throw when called.</param> ! /// <param name="expectationType">Type of expectation</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations, ! Exception expectedException, ! ExpectationMethodType expectationType ! ) ! { ! _expectedMethodName = methodName; ! _argumentExpectations = argumentExpectations; ! _expectedReturnValue = returnValue; ! _expectedException = expectedException; ! _expectationType = expectationType; ! } ! /// <summary> ! /// Expected Method Name ! /// </summary> ! public string ExpectedMethodName ! { ! get ! { ! return _expectedMethodName; ! } ! } ! /// <summary> ! /// Expected Method Type ! /// </summary> ! public ExpectationMethodType ExpectationType ! { ! get ! { ! return _expectationType; ! } ! } /// <summary> /// Expected Return Value *************** *** 201,205 **** } /// <summary> ! /// Verifies this expectation /// </summary> public void Verify( ) --- 252,256 ---- } /// <summary> ! /// Verifies this expectation, when the method is called /// </summary> public void Verify( ) *************** *** 213,225 **** ) ); } ! if ( ExpectedMethodName != ActualMethodName ) ! { ! Assertion.Fail( String.Format( ! "{0}({1}) expected, but {2} called.", ! ExpectedMethodName, argsToString( _argumentExpectations ), ! ActualMethodCall ! ) ); ! } ! if ( _argumentExpectations == null ) { return; --- 264,284 ---- ) ); } ! if (ExpectedMethodName != ActualMethodName && _expectationType == ExpectationMethodType.Call) ! { ! Assertion.Fail(String.Format( ! "{0}({1}) expected, but {2} called.", ! ExpectedMethodName, argsToString(_argumentExpectations), ! ActualMethodCall ! )); ! } ! if (ExpectedMethodName == ActualMethodName && _expectationType == ExpectationMethodType.NoCall) ! { ! Assertion.Fail(String.Format( ! "{0}({1}) was not expected.", ! ExpectedMethodName, argsToString(_argumentExpectations) ! )); ! } ! ! if (_argumentExpectations == null) { return; |
From: Griffin C. <gc...@us...> - 2006-03-06 02:25:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10746/DotNetMock Modified Files: MockObject.cs Log Message: - Merged in changes from Niklas Index: MockObject.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/MockObject.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MockObject.cs 5 Feb 2005 22:05:10 -0000 1.20 --- MockObject.cs 6 Mar 2006 02:24:58 -0000 1.21 *************** *** 24,28 **** /// <param name="name">Name of this MockObject</param> public MockObject(string name) { ! name = name; } /// <summary> --- 24,28 ---- /// <param name="name">Name of this MockObject</param> public MockObject(string name) { ! _name = name; } /// <summary> |