Permalink
Browse files

Añado proyecto de NUnit para test desde Mono

  • Loading branch information...
1 parent 5ddb731 commit 0a06f0e9c0e772c758fba82e6bed9ae5e124c90d @emiliotorrens committed Jan 18, 2012
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <section name="MongoMapperConfig" type="EtoolTech.MongoDB.Mapper.Configuration.MongoMapperConfiguration, EtoolTech.MongoDB.Mapper"/>
+ </configSections>
+ <MongoMapperConfig>
+ <Server Host="192.168.1.214" Port="27017" PoolSize="5" WaitQueueTimeout="1"/>
+ <Database Name="TestDotNET" User="" Password=""/>
+ <Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="false" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="true"/>
+ <CollectionConfig>
+ <add Name="Person">
+ <Server Host="192.168.1.214" Port="27017" PoolSize="10" WaitQueueTimeout="2"/>
+ <Database Name="TestDotNETPerson" User="user" Password="pass"/>
+ <Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="true" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="false"/>
+ </add>
+ </CollectionConfig>
+ </MongoMapperConfig>
+</configuration>
@@ -0,0 +1,17 @@
+using NUnit.Framework;
+using EtoolTech.MongoDB.Mapper.Configuration;
+
+namespace EtoolTech.MongoDB.Mapper.Test
+{
+ [TestFixture]
+ public class ConfigTest
+ {
+ [Test]
+ public void TestReadConfig()
+ {
+ Assert.AreEqual(ConfigManager.GetConnectionString("XXX"), "mongodb://192.168.1.214:27017/TestDotNET?connect=direct;maxpoolsize=5;waitQueueTimeout=1000ms;safe=true;fsync=false");
+ Assert.AreEqual(ConfigManager.GetConnectionString("Country"), "mongodb://192.168.1.214:27017/TestDotNET?connect=direct;maxpoolsize=5;waitQueueTimeout=1000ms;safe=true;fsync=false");
+ Assert.AreEqual(ConfigManager.GetConnectionString("Person"), "mongodb://user:pass@192.168.1.214:27017/TestDotNETPerson?connect=direct;maxpoolsize=10;waitQueueTimeout=2000ms;safe=true;fsync=true");
+ }
+ }
+}
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{52C9E717-6218-47A2-AEB5-0C179DB90AA5}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>EtoolTech.MongoDB.Mapper.Test.NUnit</RootNamespace>
+ <AssemblyName>EtoolTech.MongoDB.Mapper.Test.NUnit</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+ <Reference Include="MongoDB.Bson">
+ <HintPath>..\Dependencies\MongoDB.Bson.dll</HintPath>
+ </Reference>
+ <Reference Include="MongoDB.Driver">
+ <HintPath>..\Dependencies\MongoDB.Driver.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Text">
+ <HintPath>..\Dependencies\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Configuration" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test\Classes\Child.cs">
+ <Link>Clases\Child.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test\Classes\Country.cs">
+ <Link>Clases\Country.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test\Classes\Helper.cs">
+ <Link>Clases\Helper.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test\Classes\Person.cs">
+ <Link>Clases\Person.cs</Link>
+ </Compile>
+ <Compile Include="InsertModifyDeleteTest.cs" />
+ <Compile Include="ConfigTest.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <None Include="App.config">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Classes\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\EtoolTech.MongoDB.Mapper\EtoolTech.MongoDB.Mapper.csproj">
+ <Project>{9189E04F-8BC5-4219-B706-F986444474A0}</Project>
+ <Name>EtoolTech.MongoDB.Mapper</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
@@ -1,124 +1,121 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{9189E04F-8BC5-4219-B706-F986444474A0}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>EtoolTech.MongoDB.Mapper</RootNamespace>
- <AssemblyName>EtoolTech.MongoDB.Mapper</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SccProjectName>
- </SccProjectName>
- <SccLocalPath>
- </SccLocalPath>
- <SccAuxPath>
- </SccAuxPath>
- <SccProvider>
- </SccProvider>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="MongoDB.Bson, Version=1.4.4342.20601, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Dependencies\MongoDB.Bson.dll</HintPath>
- </Reference>
- <Reference Include="MongoDB.Driver, Version=1.4.4342.20602, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Dependencies\MongoDB.Driver.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Text">
- <HintPath>..\Dependencies\ServiceStack.Text.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Attributes\MongoCustomDiscriminatorType.cs" />
- <Compile Include="Attributes\MongoChildCollection.cs" />
- <Compile Include="Attributes\MongoDownRelation.cs" />
- <Compile Include="Attributes\MongoIndex.cs" />
- <Compile Include="Attributes\MongoPropertyValidator.cs" />
- <Compile Include="Attributes\MongoUpRelation.cs" />
- <Compile Include="Configuration\ConfigManager.cs" />
- <Compile Include="Core\CollectionsManager.cs" />
- <Compile Include="Core\ExtensionMethods.cs" />
- <Compile Include="Core\MongoQuery.cs" />
- <Compile Include="Core\ReflectionUtility.cs" />
- <Compile Include="Core\CustomContext.cs" />
- <Compile Include="Core\Events.cs" />
- <Compile Include="Core\ExpressionParser.cs" />
- <Compile Include="Configuration\MongoMapperConfiguration.cs" />
- <Compile Include="Core\MongoMapperIdGenerator.cs" />
- <Compile Include="Core\PropertyValidator.cs" />
- <Compile Include="Core\Serializer.cs" />
- <Compile Include="Enums\CommitOperation.cs" />
- <Compile Include="Exceptions\DeleteDocumentException.cs" />
- <Compile Include="Exceptions\ServerUpdateException.cs" />
- <Compile Include="Exceptions\DuplicateKeyException.cs" />
- <Compile Include="Exceptions\ValidatePropertyException.cs" />
- <Compile Include="Exceptions\ValidateDownRelationException.cs" />
- <Compile Include="Exceptions\FindByKeyNotFoundException.cs" />
- <Compile Include="Exceptions\TypeNotSupportedException.cs" />
- <Compile Include="Exceptions\ValidateUpRelationException.cs" />
- <Compile Include="Core\Finder.cs" />
- <Compile Include="Core\Helper.cs" />
- <Compile Include="Attributes\MongoKey.cs" />
- <Compile Include="Interfaces\IEvents.cs" />
- <Compile Include="Interfaces\IMongoMapperIdeable.cs" />
- <Compile Include="Interfaces\IMongoMapperOriginable.cs" />
- <Compile Include="Interfaces\IMongoMapperRelationable.cs" />
- <Compile Include="Interfaces\IMongoMapperWriteable.cs" />
- <Compile Include="Interfaces\IRelations.cs" />
- <Compile Include="Interfaces\IFinder.cs" />
- <Compile Include="Interfaces\ICache.cs" />
- <Compile Include="Interfaces\IConfig.cs" />
- <Compile Include="Interfaces\IRules.cs" />
- <Compile Include="Interfaces\ITransaction.cs" />
- <Compile Include="MongoMapper.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Core\Relations.cs" />
- <Compile Include="Transaction\Transaction.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9189E04F-8BC5-4219-B706-F986444474A0}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>EtoolTech.MongoDB.Mapper</RootNamespace>
+ <AssemblyName>EtoolTech.MongoDB.Mapper</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <SccProjectName>
+ </SccProjectName>
+ <SccLocalPath>
+ </SccLocalPath>
+ <SccAuxPath>
+ </SccAuxPath>
+ <SccProvider>
+ </SccProvider>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ServiceStack.Text">
+ <HintPath>..\Dependencies\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="MongoDB.Bson">
+ <HintPath>..\Dependencies\MongoDB.Bson.dll</HintPath>
+ </Reference>
+ <Reference Include="MongoDB.Driver">
+ <HintPath>..\Dependencies\MongoDB.Driver.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Attributes\MongoCustomDiscriminatorType.cs" />
+ <Compile Include="Attributes\MongoChildCollection.cs" />
+ <Compile Include="Attributes\MongoDownRelation.cs" />
+ <Compile Include="Attributes\MongoIndex.cs" />
+ <Compile Include="Attributes\MongoPropertyValidator.cs" />
+ <Compile Include="Attributes\MongoUpRelation.cs" />
+ <Compile Include="Configuration\ConfigManager.cs" />
+ <Compile Include="Core\CollectionsManager.cs" />
+ <Compile Include="Core\ExtensionMethods.cs" />
+ <Compile Include="Core\MongoQuery.cs" />
+ <Compile Include="Core\ReflectionUtility.cs" />
+ <Compile Include="Core\CustomContext.cs" />
+ <Compile Include="Core\Events.cs" />
+ <Compile Include="Core\ExpressionParser.cs" />
+ <Compile Include="Configuration\MongoMapperConfiguration.cs" />
+ <Compile Include="Core\MongoMapperIdGenerator.cs" />
+ <Compile Include="Core\PropertyValidator.cs" />
+ <Compile Include="Core\Serializer.cs" />
+ <Compile Include="Enums\CommitOperation.cs" />
+ <Compile Include="Exceptions\DeleteDocumentException.cs" />
+ <Compile Include="Exceptions\ServerUpdateException.cs" />
+ <Compile Include="Exceptions\DuplicateKeyException.cs" />
+ <Compile Include="Exceptions\ValidatePropertyException.cs" />
+ <Compile Include="Exceptions\ValidateDownRelationException.cs" />
+ <Compile Include="Exceptions\FindByKeyNotFoundException.cs" />
+ <Compile Include="Exceptions\TypeNotSupportedException.cs" />
+ <Compile Include="Exceptions\ValidateUpRelationException.cs" />
+ <Compile Include="Core\Finder.cs" />
+ <Compile Include="Core\Helper.cs" />
+ <Compile Include="Attributes\MongoKey.cs" />
+ <Compile Include="Interfaces\IEvents.cs" />
+ <Compile Include="Interfaces\IMongoMapperIdeable.cs" />
+ <Compile Include="Interfaces\IMongoMapperOriginable.cs" />
+ <Compile Include="Interfaces\IMongoMapperRelationable.cs" />
+ <Compile Include="Interfaces\IMongoMapperWriteable.cs" />
+ <Compile Include="Interfaces\IRelations.cs" />
+ <Compile Include="Interfaces\IFinder.cs" />
+ <Compile Include="Interfaces\ICache.cs" />
+ <Compile Include="Interfaces\IConfig.cs" />
+ <Compile Include="Interfaces\IRules.cs" />
+ <Compile Include="Interfaces\ITransaction.cs" />
+ <Compile Include="MongoMapper.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Core\Relations.cs" />
+ <Compile Include="Transaction\Transaction.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
Oops, something went wrong.

0 comments on commit 0a06f0e

Please sign in to comment.