Permalink
Browse files

Change default test configuration by changing following properties:

- Change "connection.driver_class" property value to "Sql2008ClientDriver"
- Change "dialect" property value to "MsSql2008Dialect"
- Remove "proxyfactory.factory_class" property
  • Loading branch information...
1 parent 63682c5 commit 1107149240f9397c1adb7acb4fb8c94a193d9255 @mahara committed Aug 7, 2011
Showing with 183 additions and 164 deletions.
  1. +10 −8 src/Castle.Facilities.NHibernateIntegration.Tests/App.config
  2. +6 −2 ...acilities.NHibernateIntegration.Tests/Castle.Facilities.NHibernateIntegration.Tests-vs2010.csproj
  3. +11 −10 src/Castle.Facilities.NHibernateIntegration.Tests/DefaultConfiguration.xml
  4. +0 −2 src/Castle.Facilities.NHibernateIntegration.Tests/Internals/CustomConfigurationBuilderTestCase.cs
  5. +36 −27 src/Castle.Facilities.NHibernateIntegration.Tests/Internals/TwoDatabaseConfiguration.xml
  6. +15 −16 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities102/facility.xml
  7. +5 −7 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities106/factory1.xml
  8. +1 −1 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities112/Fixture.cs
  9. +0 −2 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities116/Fixture.cs
  10. +10 −7 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities116/facility.xml
  11. +7 −8 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities117/facility.xml
  12. +15 −11 src/Castle.Facilities.NHibernateIntegration.Tests/Issues/Facilities119/facility.xml
  13. +7 −9 src/Castle.Facilities.NHibernateIntegration.Tests/MinimalConfiguration.xml
  14. +0 −2 src/Castle.Facilities.NHibernateIntegration.Tests/TestConfigurationBuilder.cs
  15. +40 −28 src/Castle.Facilities.NHibernateIntegration.Tests/Transactions/TwoDatabaseConfiguration.xml
  16. +6 −8 src/Castle.Facilities.NHibernateIntegration.Tests/configurationBuilderRegression.xml
  17. +7 −8 src/Castle.Facilities.NHibernateIntegration.Tests/customConfigurationBuilder.xml
  18. +7 −8 src/Castle.Facilities.NHibernateIntegration.Tests/invalidConfigurationBuilder.xml
@@ -2,13 +2,15 @@
<configuration>
<appSettings>
- <add key="nhf.dialect" value="NHibernate.Dialect.MsSql2008Dialect" />
- <add key="nhf.connection.driver_class" value="NHibernate.Driver.Sql2008ClientDriver" />
- <add key="nhf.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
- <add key="nhf.connection.connection_string.1" value="Server=(local);initial catalog=test;Integrated Security=SSPI" />
- <add key="nhf.connection.connection_string.2" value="Server=(local);initial catalog=test2;Integrated Security=SSPI" />
+ <add key="nhf.connection.driver_class"
+ value="NHibernate.Driver.Sql2008ClientDriver" />
+ <add key="nhf.dialect"
+ value="NHibernate.Dialect.MsSql2008Dialect" />
+ <add key="nhf.connection.provider"
+ value="NHibernate.Connection.DriverConnectionProvider" />
+ <add key="nhf.connection.connection_string.1"
+ value="Server=.; Initial Catalog=test; Integrated Security=SSPI" />
+ <add key="nhf.connection.connection_string.2"
+ value="Server=.; Initial Catalog=test2; Integrated Security=SSPI" />
</appSettings>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
- </startup>
</configuration>
@@ -302,10 +302,14 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Internals\TwoDatabaseConfiguration.xml" />
+ <EmbeddedResource Include="Internals\TwoDatabaseConfiguration.xml">
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Transactions\TwoDatabaseConfiguration.xml" />
+ <EmbeddedResource Include="Transactions\TwoDatabaseConfiguration.xml">
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EmptyConfiguration.xml">
@@ -2,28 +2,29 @@
<castle>
<components>
- <component id="nhibernate.session.interceptor.intercepted" type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests" service="NHibernate.IInterceptor, NHibernate" />
+ <component id="nhibernate.session.interceptor.intercepted"
+ type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests"
+ service="NHibernate.IInterceptor, NHibernate" />
</components>
<facilities>
- <facility id="nhibernatefacility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
+ <facility id="nhibernatefacility"
+ type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
+ configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
<factory id="sessionFactory1">
<settings>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
+ </item>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
- </item>
- <item key="proxyfactory.factory_class">
- NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
+ NHibernate.Dialect.MsSql2008Dialect
</item>
</settings>
<assemblies>
@@ -56,8 +56,6 @@ public Configuration GetConfiguration(IConfiguration config)
nhConfig.Properties["connection.connection_string"] =
ConfigurationManager.AppSettings["nhf.connection.connection_string.2"];
}
- nhConfig.Properties["proxyfactory.factory_class"] =
- ConfigurationManager.AppSettings["nhf.proxyfactory.factory_class"];
return nhConfig;
}
@@ -2,25 +2,29 @@
<castle>
<components>
- <component id="nhibernate.session.interceptor.intercepted" type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests" service="NHibernate.IInterceptor, NHibernate" />
+ <component id="nhibernate.session.interceptor.intercepted"
+ type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests"
+ service="NHibernate.IInterceptor, NHibernate" />
</components>
<facilities>
- <facility id="nhibernatefacility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
+ <facility id="nhibernatefacility"
+ type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
+ configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
<factory id="sessionFactory1">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </item>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -30,19 +34,20 @@
</assemblies>
</factory>
- <factory id="sessionFactory2" alias="db2">
+ <factory id="sessionFactory2"
+ alias="db2">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test2;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </item>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test2; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -52,19 +57,20 @@
</assemblies>
</factory>
- <factory id="sessionFactory3" alias="intercepted">
+ <factory id="sessionFactory3"
+ alias="intercepted">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test2;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </item>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test2; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -74,19 +80,20 @@
</assemblies>
</factory>
- <factory id="sessionFactory4" alias="listeners">
+ <factory id="sessionFactory4"
+ alias="listeners">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test2;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </item>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test2; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -95,8 +102,10 @@
</assembly>
</assemblies>
<listeners>
- <listener type="Castle.Facilities.NHibernateIntegration.Tests.Common.CustomSaveUpdateListener,Castle.Facilities.NHibernateIntegration.Tests" event="SaveUpdate" />
- <listener type="Castle.Facilities.NHibernateIntegration.Tests.Common.CustomDeleteListener,Castle.Facilities.NHibernateIntegration.Tests" event="Delete" />
+ <listener type="Castle.Facilities.NHibernateIntegration.Tests.Common.CustomSaveUpdateListener,Castle.Facilities.NHibernateIntegration.Tests"
+ event="SaveUpdate" />
+ <listener type="Castle.Facilities.NHibernateIntegration.Tests.Common.CustomDeleteListener,Castle.Facilities.NHibernateIntegration.Tests"
+ event="Delete" />
</listeners>
</factory>
</facility>
@@ -2,28 +2,29 @@
<castle>
<components>
- <component id="nhibernate.session.interceptor.intercepted" type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests" service="NHibernate.IInterceptor, NHibernate" />
+ <component id="nhibernate.session.interceptor.intercepted"
+ type="Castle.Facilities.NHibernateIntegration.Tests.Common.TestInterceptor, Castle.Facilities.NHibernateIntegration.Tests"
+ service="NHibernate.IInterceptor, NHibernate" />
</components>
<facilities>
- <facility id="nhibernatefacility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
+ <facility id="nhibernatefacility"
+ type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
+ configurationBuilder="Castle.Facilities.NHibernateIntegration.Tests.TestConfigurationBuilder, Castle.Facilities.NHibernateIntegration.Tests">
<factory id="sessionFactory1">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
</item>
- <item key="proxyfactory.factory_class">
- NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -33,22 +34,20 @@
</assemblies>
</factory>
- <factory id="sessionFactory2" alias="intercepted">
+ <factory id="sessionFactory2"
+ alias="intercepted">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="connection.connection_string">
- Data Source=.;Initial Catalog=test2;Integrated Security=SSPI
+ Data Source=.; Initial Catalog=test2; Integrated Security=SSPI
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
- </item>
- <item key="proxyfactory.factory_class">
- NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
+ NHibernate.Dialect.MsSql2008Dialect
</item>
</settings>
<assemblies>
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
- <bytecode-provider type="lcg" />
- <reflection-optimizer use="true" />
<session-factory name="sessionFactory1 ">
<property name="connection.provider">DummyProvider</property>
<property name="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </property>
- <property name="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</property>
<property name="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </property>
+ <property name="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
</property>
<mapping assembly="Castle.Facilities.NHibernateIntegration.Tests"></mapping>
</session-factory>
@@ -49,7 +49,7 @@ public virtual void SessionFactory_is_lazily_initialized()
var instance = instanceField.GetValue(lifeStyleManager);
Assert.IsNull(instance);
- var factory = container.Resolve<ISessionFactory>();
+ container.Resolve<ISessionFactory>();
instance = instanceField.GetValue(lifeStyleManager);
Assert.IsNotNull(instance);
@@ -122,8 +122,6 @@ private static void ConfigureConnectionSettings(Configuration nhConfig)
nhConfig.Properties["connection.provider"] = ConfigurationManager.AppSettings["nhf.connection.provider"];
nhConfig.Properties["connection.connection_string"] =
ConfigurationManager.AppSettings["nhf.connection.connection_string.1"];
- nhConfig.Properties["proxyfactory.factory_class"] =
- ConfigurationManager.AppSettings["nhf.proxyfactory.factory_class"];
}
}
}
@@ -2,8 +2,11 @@
<castle>
<facilities>
- <facility id="nhibernatefacility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" configurationBuilder="Castle.Facilities.NHibernateIntegration.Internal.PersistentConfigurationBuilder, Castle.Facilities.NHibernateIntegration">
- <factory id="sessionFactory1" fileName="myconfig.dat">
+ <facility id="nhibernatefacility"
+ type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
+ configurationBuilder="Castle.Facilities.NHibernateIntegration.Internal.PersistentConfigurationBuilder, Castle.Facilities.NHibernateIntegration">
+ <factory id="sessionFactory1"
+ fileName="myconfig.dat">
<dependsOn>
<file>NHibernate.dll</file>
<file>SampleDllFile</file>
@@ -13,13 +16,13 @@
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
+ </item>
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
</item>
</settings>
<assemblies>
@@ -2,23 +2,22 @@
<castle>
<facilities>
- <facility id="nhibernatefacility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" configurationBuilder="Castle.Facilities.NHibernateIntegration.Internal.PersistentConfigurationBuilder, Castle.Facilities.NHibernateIntegration">
+ <facility id="nhibernatefacility"
+ type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
+ configurationBuilder="Castle.Facilities.NHibernateIntegration.Internal.PersistentConfigurationBuilder, Castle.Facilities.NHibernateIntegration">
<factory id="sessionFactory1">
<settings>
<item key="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</item>
<item key="connection.driver_class">
- NHibernate.Driver.SqlClientDriver
- </item>
- <item key="connection.connection_string">
- Data Source=.;Initial Catalog=test;Integrated Security=SSPI
+ NHibernate.Driver.Sql2008ClientDriver
</item>
<item key="dialect">
- NHibernate.Dialect.MsSql2000Dialect
+ NHibernate.Dialect.MsSql2008Dialect
</item>
- <item key="proxyfactory.factory_class">
- NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
+ <item key="connection.connection_string">
+ Data Source=.; Initial Catalog=test; Integrated Security=SSPI
</item>
</settings>
<assemblies>
Oops, something went wrong.

0 comments on commit 1107149

Please sign in to comment.