Skip to content
Browse files

IDI-31 Creada Solución en Mono con su proyecto de testing

  • Loading branch information...
1 parent 64b25f6 commit 6e8d6ff078971232847b09e35fe4835f11783123 @emiliotorrens committed
View
24 EtoolTech.MongoDB.Mapper.Test.NUnit/App.config
@@ -3,14 +3,34 @@
<configSections>
<section name="MongoMapperConfig" type="EtoolTech.MongoDB.Mapper.Configuration.MongoMapperConfiguration, EtoolTech.MongoDB.Mapper"/>
</configSections>
+ <!--
+ <MongoMapperConfig>
+ <Server Host="10.176.194.191:27017,10.176.195.254:27017,10.176.196.5:27017"
+ ReplicaSetName="dingusSet1" MinReplicaServersToWrite="1" BalancedReading="true" PoolSize="50" WaitQueueTimeout="1"/>
+ <Database Name="TestDotNET" User="" Password=""/>
+ <Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="true" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="true" UseChidlsIncrementalId="false"/>
+ <CollectionConfig>
+ <add Name="Person">
+ <Server Host="10.176.194.191:27017,10.176.195.254:27017,10.176.196.5:27017" ReplicaSetName="dingusSet1" MinReplicaServersToWrite="1" BalancedReading="true" PoolSize="50" WaitQueueTimeout="2"/>
+ <Database Name="TestDotNETPerson" User="" Password=""/>
+ <Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="true" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="false" UseChidlsIncrementalId="true"/>
+ </add>
+ <add Name="Fake">
+ <Server Host="fake.com:27017" ReplicaSetName="" MinReplicaServersToWrite="0" BalancedReading="false" PoolSize="100" WaitQueueTimeout="2"/>
+ <Database Name="Test" User="user" Password="pass"/>
+ <Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="false" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="false" UseChidlsIncrementalId="false"/>
+ </add>
+ </CollectionConfig>
+ </MongoMapperConfig>
+ -->
<MongoMapperConfig>
- <Server Host="192.168.1.214:27017,192.168.1.216:27017,192.168.1.14:27017"
+ <Server Host="192.168.1.218:27017,192.168.1.216:27017,192.168.1.14:27017"
ReplicaSetName="devSet" MinReplicaServersToWrite="1" BalancedReading="true" PoolSize="50" WaitQueueTimeout="1"/>
<Database Name="TestDotNET" User="" Password=""/>
<Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="true" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="true" UseChidlsIncrementalId="false"/>
<CollectionConfig>
<add Name="Person">
- <Server Host="192.168.1.214:27017,192.168.1.216:27017,192.168.1.14:27017" ReplicaSetName="devSet" MinReplicaServersToWrite="1" BalancedReading="true" PoolSize="50" WaitQueueTimeout="2"/>
+ <Server Host="192.168.1.218:27017,192.168.1.216:27017,192.168.1.14:27017" ReplicaSetName="devSet" MinReplicaServersToWrite="1" BalancedReading="true" PoolSize="50" WaitQueueTimeout="2"/>
<Database Name="TestDotNETPerson" User="" Password=""/>
<Context Generated="true" MaxDocumentSize="8" SafeMode="true" FSync="true" ExceptionOnDuplicateKey="true" EnableOriginalObject="true" UseIncrementalId="false" UseChidlsIncrementalId="true"/>
</add>
View
19 EtoolTech.MongoDB.Mapper.Test.NUnit/ConfigTest.cs
@@ -9,12 +9,23 @@ public class ConfigTest
[Test]
public void TestReadConfig()
{
- Assert.AreEqual(ConfigManager.GetConnectionString("XXX"),
- "mongodb://192.168.1.214:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNET?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
+ /*
+ Assert.AreEqual(ConfigManager.GetConnectionString("XXX"),
+ "mongodb://10.176.194.191:27017,10.176.195.254:27017,10.176.196.5:27017/TestDotNET?replicaSet=dingusSet1;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
Assert.AreEqual(ConfigManager.GetConnectionString("Country"),
- "mongodb://192.168.1.214:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNET?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
+ "mongodb://10.176.194.191:27017,10.176.195.254:27017,10.176.196.5:27017/TestDotNET?replicaSet=dingusSet1;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
Assert.AreEqual(ConfigManager.GetConnectionString("Person"),
- "mongodb://192.168.1.214:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNETPerson?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=2000ms;safe=true;fsync=true");
+ "mongodb://10.176.194.191:27017,10.176.195.254:27017,10.176.196.5:27017/TestDotNETPerson?replicaSet=dingusSet1;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=2000ms;safe=true;fsync=true");
+ Assert.AreEqual(ConfigManager.GetConnectionString("Fake"),
+ "mongodb://user:pass@fake.com:27017/Test?maxpoolsize=100;waitQueueTimeout=2000ms;safe=true;fsync=false");
+ */
+
+ Assert.AreEqual(ConfigManager.GetConnectionString("XXX"),
+ "mongodb://192.168.1.218:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNET?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
+ Assert.AreEqual(ConfigManager.GetConnectionString("Country"),
+ "mongodb://192.168.1.218:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNET?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=1000ms;safe=true;fsync=true");
+ Assert.AreEqual(ConfigManager.GetConnectionString("Person"),
+ "mongodb://192.168.1.218:27017,192.168.1.216:27017,192.168.1.14:27017/TestDotNETPerson?replicaSet=devSet;w=1;slaveOk=true;maxpoolsize=50;waitQueueTimeout=2000ms;safe=true;fsync=true");
Assert.AreEqual(ConfigManager.GetConnectionString("Fake"),
"mongodb://user:pass@fake.com:27017/Test?maxpoolsize=100;waitQueueTimeout=2000ms;safe=true;fsync=false");
}
View
105 EtoolTech.MongoDB.Mapper.Test_Mono.NUnit/EtoolTech.MongoDB.Mapper.Test_Mono.NUnit.csproj
@@ -0,0 +1,105 @@
+<?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>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{91BF51A0-5E42-4320-98DF-291E6F94697A}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>EtoolTech.MongoDB.Mapper.Test_Mono.NUnit</RootNamespace>
+ <AssemblyName>EtoolTech.MongoDB.Mapper.Test_Mono.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="System.Configuration" />
+ <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>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\Classes\Child.cs">
+ <Link>Classes\Child.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\Classes\Country.cs">
+ <Link>Classes\Country.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\Classes\Helper.cs">
+ <Link>Classes\Helper.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\Classes\Person.cs">
+ <Link>Classes\Person.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\AmbiguousDiscriminatorTest.cs">
+ <Link>AmbiguousDiscriminatorTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\ConfigTest.cs">
+ <Link>ConfigTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\EventsTest.cs">
+ <Link>EventsTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\ExtensionTest.cs">
+ <Link>ExtensionTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\FindTest.cs">
+ <Link>FindTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\IncrementalIdTest.cs">
+ <Link>IncrementalIdTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\InsertModifyDeleteTest.cs">
+ <Link>InsertModifyDeleteTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\OriginalObjectTest.cs">
+ <Link>OriginalObjectTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\ReflectionUtilityTest.cs">
+ <Link>ReflectionUtilityTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\RelationsTest.cs">
+ <Link>RelationsTest.cs</Link>
+ </Compile>
+ <Compile Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\TestReplicaSet.cs">
+ <Link>TestReplicaSet.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\EtoolTech.MongoDB.Mapper.Test.NUnit\App.config">
+ <Link>App.config</Link>
+ </None>
+ </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>
View
26 MongoMapper_Mono.NET.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EtoolTech.MongoDB.Mapper", "EtoolTech.MongoDB.Mapper\EtoolTech.MongoDB.Mapper.csproj", "{9189E04F-8BC5-4219-B706-F986444474A0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EtoolTech.MongoDB.Mapper.Test_Mono.NUnit", "EtoolTech.MongoDB.Mapper.Test_Mono.NUnit\EtoolTech.MongoDB.Mapper.Test_Mono.NUnit.csproj", "{91BF51A0-5E42-4320-98DF-291E6F94697A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9189E04F-8BC5-4219-B706-F986444474A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9189E04F-8BC5-4219-B706-F986444474A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9189E04F-8BC5-4219-B706-F986444474A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9189E04F-8BC5-4219-B706-F986444474A0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91BF51A0-5E42-4320-98DF-291E6F94697A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91BF51A0-5E42-4320-98DF-291E6F94697A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91BF51A0-5E42-4320-98DF-291E6F94697A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91BF51A0-5E42-4320-98DF-291E6F94697A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = EtoolTech.MongoDB.Mapper\EtoolTech.MongoDB.Mapper.csproj
+ EndGlobalSection
+EndGlobal

0 comments on commit 6e8d6ff

Please sign in to comment.
Something went wrong with that request. Please try again.