Remove NHibernate integration projects except for 3.2
This commit is contained in:
@@ -1,64 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<log4net debug="false">
|
||||
|
||||
<!--
|
||||
<appender name="AspNetTraceAppender" type="log4net.Appender.AspNetTraceAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="[%thread] %-5level - %message" />
|
||||
</layout>
|
||||
</appender>
|
||||
-->
|
||||
|
||||
|
||||
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="l:\temp\log.txt" />
|
||||
<appendToFile value="true" />
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="10" />
|
||||
<maximumFileSize value="100KB" />
|
||||
<staticLogFileName value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%-5level %type{1} - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%-5level %type{1} - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- simple appender to get results to UI -->
|
||||
<!--
|
||||
<appender name="MemoryAppender" type="log4net.Appender.MemoryAppender">
|
||||
|
||||
</appender>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Set default logging level to DEBUG -->
|
||||
<root>
|
||||
<level value="TRACE" />
|
||||
<!--<appender-ref ref="AspNetTraceAppender" />-->
|
||||
<appender-ref ref="TraceAppender" />
|
||||
<!--
|
||||
<appender-ref ref="RollingFileAppender" />
|
||||
-->
|
||||
</root>
|
||||
<!--
|
||||
In Spring.NET there is a 1-1 correspondence between the logger name and
|
||||
the namespace of the class doing the logging...
|
||||
-->
|
||||
<logger name="Spring">
|
||||
<level value="TRACE" />
|
||||
</logger>
|
||||
<logger name="NHibernate">
|
||||
<level value="INFO" />
|
||||
</logger>
|
||||
<logger name="Spring.Transaction>">
|
||||
<level value="INFO" />
|
||||
<appender-ref ref="MemoryAppender" />
|
||||
</logger>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<log4net debug="false">
|
||||
|
||||
<!--
|
||||
<appender name="AspNetTraceAppender" type="log4net.Appender.AspNetTraceAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="[%thread] %-5level - %message" />
|
||||
</layout>
|
||||
</appender>
|
||||
-->
|
||||
|
||||
|
||||
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="l:\temp\log.txt" />
|
||||
<appendToFile value="true" />
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="10" />
|
||||
<maximumFileSize value="100KB" />
|
||||
<staticLogFileName value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%-5level %type{1} - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%-5level %type{1} - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- simple appender to get results to UI -->
|
||||
<!--
|
||||
<appender name="MemoryAppender" type="log4net.Appender.MemoryAppender">
|
||||
|
||||
</appender>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Set default logging level to DEBUG -->
|
||||
<root>
|
||||
<level value="TRACE" />
|
||||
<!--<appender-ref ref="AspNetTraceAppender" />-->
|
||||
<appender-ref ref="TraceAppender" />
|
||||
<!--
|
||||
<appender-ref ref="RollingFileAppender" />
|
||||
-->
|
||||
</root>
|
||||
<!--
|
||||
In Spring.NET there is a 1-1 correspondence between the logger name and
|
||||
the namespace of the class doing the logging...
|
||||
-->
|
||||
<logger name="Spring">
|
||||
<level value="TRACE" />
|
||||
</logger>
|
||||
<logger name="NHibernate">
|
||||
<level value="INFO" />
|
||||
</logger>
|
||||
<logger name="Spring.Transaction>">
|
||||
<level value="INFO" />
|
||||
<appender-ref ref="MemoryAppender" />
|
||||
</logger>
|
||||
</log4net>
|
||||
@@ -1,24 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
public class AccountController : IAccountController
|
||||
{
|
||||
private IAccountManager accountManager;
|
||||
|
||||
public IAccountManager AccountManager
|
||||
{
|
||||
get { return accountManager; }
|
||||
set { accountManager = value; }
|
||||
}
|
||||
|
||||
#region Implementation of IAccountController
|
||||
|
||||
public void DoWork()
|
||||
{
|
||||
accountManager.DoTransfer(30,30);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
public class AccountController : IAccountController
|
||||
{
|
||||
private IAccountManager accountManager;
|
||||
|
||||
public IAccountManager AccountManager
|
||||
{
|
||||
get { return accountManager; }
|
||||
set { accountManager = value; }
|
||||
}
|
||||
|
||||
#region Implementation of IAccountController
|
||||
|
||||
public void DoWork()
|
||||
{
|
||||
accountManager.DoTransfer(30,30);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,108 +1,107 @@
|
||||
#if NH_2_1
|
||||
using log4net.Config;
|
||||
using NHibernate;
|
||||
using NHibernate.Bytecode;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Engine;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public abstract class AbstractInjectableUserTypeFixture
|
||||
{
|
||||
protected ISessionFactoryImplementor sessions;
|
||||
|
||||
static AbstractInjectableUserTypeFixture()
|
||||
{
|
||||
XmlConfigurator.Configure();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the ServiceLocator registering all services needed by this test.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Services needed, in this test, are:
|
||||
///
|
||||
/// - uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.IDelimiter
|
||||
/// Implementation: uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.ParenDelimiter
|
||||
///
|
||||
/// - uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.InjectableStringUserType
|
||||
/// </remarks>
|
||||
protected abstract void InitializeServiceLocator();
|
||||
|
||||
protected abstract IBytecodeProvider GetBytecodeProvider();
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[TestFixtureSetUp]
|
||||
public void CreateDb()
|
||||
{
|
||||
InitializeServiceLocator();
|
||||
Configuration cfg = new Configuration();
|
||||
Environment.BytecodeProvider = GetBytecodeProvider();
|
||||
cfg.Configure();
|
||||
cfg.AddResource("uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.Foo.Spechbm.xml",
|
||||
typeof(AbstractInjectableUserTypeFixture).Assembly);
|
||||
new SchemaExport(cfg).Create(false, true);
|
||||
sessions = (ISessionFactoryImplementor)cfg.BuildSessionFactory();
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[TestFixtureTearDown]
|
||||
public void CloseSessionFactory()
|
||||
{
|
||||
if (sessions != null)
|
||||
{
|
||||
sessions.Dispose();
|
||||
}
|
||||
sessions = null;
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[Test]
|
||||
public void SaveObjectWithStringChangedToUpper()
|
||||
{
|
||||
object savedId;
|
||||
Foo f = new Foo("something");
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
using (ITransaction tx = s.BeginTransaction())
|
||||
{
|
||||
savedId = s.Save(f);
|
||||
tx.Commit();
|
||||
}
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
{
|
||||
Foo upperFoo = s.Get<Foo>(savedId);
|
||||
|
||||
Assert.AreEqual("[something]", upperFoo.Description);
|
||||
}
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[Test]
|
||||
public void SaveNullPropertyAndGetItBack()
|
||||
{
|
||||
object savedId;
|
||||
Foo f = new Foo("");
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
using (ITransaction tx = s.BeginTransaction())
|
||||
{
|
||||
savedId = s.Save(f);
|
||||
tx.Commit();
|
||||
}
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
{
|
||||
Foo upperFoo = s.Get<Foo>(savedId);
|
||||
|
||||
Assert.IsNull(upperFoo.Description);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
using log4net.Config;
|
||||
|
||||
using NHibernate;
|
||||
using NHibernate.Bytecode;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Engine;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public abstract class AbstractInjectableUserTypeFixture
|
||||
{
|
||||
protected ISessionFactoryImplementor sessions;
|
||||
|
||||
static AbstractInjectableUserTypeFixture()
|
||||
{
|
||||
XmlConfigurator.Configure();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the ServiceLocator registering all services needed by this test.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Services needed, in this test, are:
|
||||
///
|
||||
/// - uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.IDelimiter
|
||||
/// Implementation: uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.ParenDelimiter
|
||||
///
|
||||
/// - uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.InjectableStringUserType
|
||||
/// </remarks>
|
||||
protected abstract void InitializeServiceLocator();
|
||||
|
||||
protected abstract IBytecodeProvider GetBytecodeProvider();
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[TestFixtureSetUp]
|
||||
public void CreateDb()
|
||||
{
|
||||
InitializeServiceLocator();
|
||||
Configuration cfg = new Configuration();
|
||||
Environment.BytecodeProvider = GetBytecodeProvider();
|
||||
cfg.Configure();
|
||||
cfg.AddResource("uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider.Foo.Spechbm.xml",
|
||||
typeof(AbstractInjectableUserTypeFixture).Assembly);
|
||||
new SchemaExport(cfg).Create(false, true);
|
||||
sessions = (ISessionFactoryImplementor)cfg.BuildSessionFactory();
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[TestFixtureTearDown]
|
||||
public void CloseSessionFactory()
|
||||
{
|
||||
if (sessions != null)
|
||||
{
|
||||
sessions.Dispose();
|
||||
}
|
||||
sessions = null;
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[Test]
|
||||
public void SaveObjectWithStringChangedToUpper()
|
||||
{
|
||||
object savedId;
|
||||
Foo f = new Foo("something");
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
using (ITransaction tx = s.BeginTransaction())
|
||||
{
|
||||
savedId = s.Save(f);
|
||||
tx.Commit();
|
||||
}
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
{
|
||||
Foo upperFoo = s.Get<Foo>(savedId);
|
||||
|
||||
Assert.AreEqual("[something]", upperFoo.Description);
|
||||
}
|
||||
}
|
||||
|
||||
[Ignore("Work in progress")]
|
||||
[Test]
|
||||
public void SaveNullPropertyAndGetItBack()
|
||||
{
|
||||
object savedId;
|
||||
Foo f = new Foo("");
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
using (ITransaction tx = s.BeginTransaction())
|
||||
{
|
||||
savedId = s.Save(f);
|
||||
tx.Commit();
|
||||
}
|
||||
|
||||
using (ISession s = sessions.OpenSession())
|
||||
{
|
||||
Foo upperFoo = s.Get<Foo>(savedId);
|
||||
|
||||
Assert.IsNull(upperFoo.Description);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
|
||||
assembly="uNhAddIns.Adapters.CommonTests"
|
||||
namespace="uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider">
|
||||
|
||||
<typedef name="SpecialString"
|
||||
class="InjectableStringUserType"/>
|
||||
|
||||
<class name ="Foo">
|
||||
<id type="int">
|
||||
<generator class="hilo"/>
|
||||
</id>
|
||||
<property name="Description" type="SpecialString" />
|
||||
</class>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
|
||||
assembly="uNhAddIns.Adapters.CommonTests"
|
||||
namespace="uNhAddIns.Adapters.CommonTests.EnhancedBytecodeProvider">
|
||||
|
||||
<typedef name="SpecialString"
|
||||
class="InjectableStringUserType"/>
|
||||
|
||||
<class name ="Foo">
|
||||
<id type="int">
|
||||
<generator class="hilo"/>
|
||||
</id>
|
||||
<property name="Description" type="SpecialString" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,20 +1,18 @@
|
||||
#if NH_2_1
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class Foo
|
||||
{
|
||||
private string _description;
|
||||
|
||||
public Foo(string description)
|
||||
{
|
||||
_description = description;
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get { return _description; }
|
||||
set { _description = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class Foo
|
||||
{
|
||||
private string _description;
|
||||
|
||||
public Foo(string description)
|
||||
{
|
||||
_description = description;
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get { return _description; }
|
||||
set { _description = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,23 @@
|
||||
#if NH_2_1
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public interface IDelimiter
|
||||
{
|
||||
string Delimit(string source);
|
||||
}
|
||||
|
||||
public class ParenDelimiter: IDelimiter
|
||||
{
|
||||
public string Delimit(string source)
|
||||
{
|
||||
return !source.StartsWith("[") ? string.Format("[{0}]", source) : source;
|
||||
}
|
||||
}
|
||||
|
||||
public class NoOpDelimiter: IDelimiter
|
||||
{
|
||||
public string Delimit(string source)
|
||||
{
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public interface IDelimiter
|
||||
{
|
||||
string Delimit(string source);
|
||||
}
|
||||
|
||||
public class ParenDelimiter: IDelimiter
|
||||
{
|
||||
public string Delimit(string source)
|
||||
{
|
||||
return !source.StartsWith("[") ? string.Format("[{0}]", source) : source;
|
||||
}
|
||||
}
|
||||
|
||||
public class NoOpDelimiter: IDelimiter
|
||||
{
|
||||
public string Delimit(string source)
|
||||
{
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +1,89 @@
|
||||
#if NH_2_1
|
||||
using System.Data;
|
||||
using NHibernate;
|
||||
using NHibernate.SqlTypes;
|
||||
using NHibernate.UserTypes;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class InjectableStringUserType : IUserType
|
||||
{
|
||||
private readonly IDelimiter delimiter;
|
||||
|
||||
public InjectableStringUserType(IDelimiter delimiter)
|
||||
{
|
||||
this.delimiter = delimiter;
|
||||
}
|
||||
|
||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
||||
{
|
||||
string resultString = (string)NHibernateUtil.String.NullSafeGet(rs, names[0]);
|
||||
if (resultString != null)
|
||||
return delimiter.Delimit(resultString);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void NullSafeSet(IDbCommand cmd, object value, int index)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
NHibernateUtil.String.NullSafeSet(cmd, null, index);
|
||||
return;
|
||||
}
|
||||
|
||||
value = delimiter.Delimit((string)value);
|
||||
|
||||
NHibernateUtil.String.NullSafeSet(cmd, value, index);
|
||||
}
|
||||
|
||||
public object DeepCopy(object value)
|
||||
{
|
||||
if (value == null) return null;
|
||||
return string.Copy((string)value);
|
||||
}
|
||||
|
||||
public object Replace(object original, object target, object owner)
|
||||
{
|
||||
return original;
|
||||
}
|
||||
|
||||
public object Assemble(object cached, object owner)
|
||||
{
|
||||
return DeepCopy(cached);
|
||||
}
|
||||
|
||||
public object Disassemble(object value)
|
||||
{
|
||||
return DeepCopy(value);
|
||||
}
|
||||
|
||||
public SqlType[] SqlTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SqlType[] { new SqlType(DbType.String) };
|
||||
}
|
||||
}
|
||||
|
||||
public System.Type ReturnedType
|
||||
{
|
||||
get { return typeof(string); }
|
||||
}
|
||||
|
||||
public bool IsMutable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public new bool Equals(object x, object y)
|
||||
{
|
||||
if (x == null || y == null) return false;
|
||||
return x.Equals(y);
|
||||
}
|
||||
|
||||
public int GetHashCode(object x)
|
||||
{
|
||||
return x.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
using System.Data;
|
||||
|
||||
using NHibernate;
|
||||
using NHibernate.SqlTypes;
|
||||
using NHibernate.UserTypes;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class InjectableStringUserType : IUserType
|
||||
{
|
||||
private readonly IDelimiter delimiter;
|
||||
|
||||
public InjectableStringUserType(IDelimiter delimiter)
|
||||
{
|
||||
this.delimiter = delimiter;
|
||||
}
|
||||
|
||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
||||
{
|
||||
string resultString = (string)NHibernateUtil.String.NullSafeGet(rs, names[0]);
|
||||
if (resultString != null)
|
||||
return delimiter.Delimit(resultString);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void NullSafeSet(IDbCommand cmd, object value, int index)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
NHibernateUtil.String.NullSafeSet(cmd, null, index);
|
||||
return;
|
||||
}
|
||||
|
||||
value = delimiter.Delimit((string)value);
|
||||
|
||||
NHibernateUtil.String.NullSafeSet(cmd, value, index);
|
||||
}
|
||||
|
||||
public object DeepCopy(object value)
|
||||
{
|
||||
if (value == null) return null;
|
||||
return string.Copy((string)value);
|
||||
}
|
||||
|
||||
public object Replace(object original, object target, object owner)
|
||||
{
|
||||
return original;
|
||||
}
|
||||
|
||||
public object Assemble(object cached, object owner)
|
||||
{
|
||||
return DeepCopy(cached);
|
||||
}
|
||||
|
||||
public object Disassemble(object value)
|
||||
{
|
||||
return DeepCopy(value);
|
||||
}
|
||||
|
||||
public SqlType[] SqlTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SqlType[] { new SqlType(DbType.String) };
|
||||
}
|
||||
}
|
||||
|
||||
public System.Type ReturnedType
|
||||
{
|
||||
get { return typeof(string); }
|
||||
}
|
||||
|
||||
public bool IsMutable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public new bool Equals(object x, object y)
|
||||
{
|
||||
if (x == null || y == null) return false;
|
||||
return x.Equals(y);
|
||||
}
|
||||
|
||||
public int GetHashCode(object x)
|
||||
{
|
||||
return x.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,46 @@
|
||||
#if NH_2_1
|
||||
using NHibernate.Bytecode;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Objects.Factory.Support;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
[TestFixture, Explicit("requires database")]
|
||||
public class InjectableUserTypeFixture : AbstractInjectableUserTypeFixture
|
||||
{
|
||||
private IConfigurableListableObjectFactory objectFactory;
|
||||
private static readonly IObjectDefinitionFactory objectDefinitionFactory = new DefaultObjectDefinitionFactory();
|
||||
|
||||
protected override void InitializeServiceLocator()
|
||||
{
|
||||
IConfigurableApplicationContext context = new StaticApplicationContext();
|
||||
objectFactory = context.ObjectFactory;
|
||||
|
||||
Register<IDelimiter, ParenDelimiter>(objectFactory);
|
||||
RegisterPrototype<InjectableStringUserType>(objectFactory);
|
||||
}
|
||||
|
||||
protected override IBytecodeProvider GetBytecodeProvider()
|
||||
{
|
||||
return new BytecodeProvider(objectFactory);
|
||||
}
|
||||
|
||||
private static void Register<TSerivice, TImplementation>(IConfigurableListableObjectFactory confObjFactory)
|
||||
{
|
||||
ObjectDefinitionBuilder odb = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, typeof(TImplementation)).
|
||||
SetAutowireMode(AutoWiringMode.Constructor);
|
||||
confObjFactory.RegisterObjectDefinition(typeof (TSerivice).FullName, odb.ObjectDefinition);
|
||||
}
|
||||
|
||||
private static void RegisterPrototype<TImplementation>(IConfigurableListableObjectFactory confObjFactory)
|
||||
{
|
||||
ObjectDefinitionBuilder odb = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, typeof(TImplementation))
|
||||
.SetSingleton(false).SetAutowireMode(AutoWiringMode.AutoDetect);
|
||||
confObjFactory.RegisterObjectDefinition(typeof(TImplementation).FullName, odb.ObjectDefinition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
using NHibernate.Bytecode;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Objects.Factory.Support;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
[TestFixture, Explicit("requires database")]
|
||||
public class InjectableUserTypeFixture : AbstractInjectableUserTypeFixture
|
||||
{
|
||||
private IConfigurableListableObjectFactory objectFactory;
|
||||
private static readonly IObjectDefinitionFactory objectDefinitionFactory = new DefaultObjectDefinitionFactory();
|
||||
|
||||
protected override void InitializeServiceLocator()
|
||||
{
|
||||
IConfigurableApplicationContext context = new StaticApplicationContext();
|
||||
objectFactory = context.ObjectFactory;
|
||||
|
||||
Register<IDelimiter, ParenDelimiter>(objectFactory);
|
||||
RegisterPrototype<InjectableStringUserType>(objectFactory);
|
||||
}
|
||||
|
||||
protected override IBytecodeProvider GetBytecodeProvider()
|
||||
{
|
||||
return new BytecodeProvider(objectFactory);
|
||||
}
|
||||
|
||||
private static void Register<TSerivice, TImplementation>(IConfigurableListableObjectFactory confObjFactory)
|
||||
{
|
||||
ObjectDefinitionBuilder odb = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, typeof(TImplementation)).
|
||||
SetAutowireMode(AutoWiringMode.Constructor);
|
||||
confObjFactory.RegisterObjectDefinition(typeof (TSerivice).FullName, odb.ObjectDefinition);
|
||||
}
|
||||
|
||||
private static void RegisterPrototype<TImplementation>(IConfigurableListableObjectFactory confObjFactory)
|
||||
{
|
||||
ObjectDefinitionBuilder odb = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, typeof(TImplementation))
|
||||
.SetSingleton(false).SetAutowireMode(AutoWiringMode.AutoDetect);
|
||||
confObjFactory.RegisterObjectDefinition(typeof(TImplementation).FullName, odb.ObjectDefinition);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#region License
|
||||
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
@@ -14,21 +14,21 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
[TestFixture]
|
||||
public class NHibernateTestImports : global::NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
[TestFixture]
|
||||
public class NHibernateTestImports : global::NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,29 @@
|
||||
#if NH_2_1
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
private Guid _id;
|
||||
private string _description;
|
||||
private decimal _price;
|
||||
|
||||
public virtual Guid Id
|
||||
{
|
||||
get { return _id; }
|
||||
set { _id = value; }
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get { return _description; }
|
||||
set { _description = value; }
|
||||
}
|
||||
|
||||
public virtual decimal Price
|
||||
{
|
||||
get { return _price; }
|
||||
set { _price = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate.Bytecode
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
private Guid _id;
|
||||
private string _description;
|
||||
private decimal _price;
|
||||
|
||||
public virtual Guid Id
|
||||
{
|
||||
get { return _id; }
|
||||
set { _id = value; }
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get { return _description; }
|
||||
set { _description = value; }
|
||||
}
|
||||
|
||||
public virtual decimal Price
|
||||
{
|
||||
get { return _price; }
|
||||
set { _price = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<object id="accountController" type="Spring.Data.NHibernate.AccountController, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="AccountManager" ref="accountManager"/>
|
||||
</object>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<object id="accountController" type="Spring.Data.NHibernate.AccountController">
|
||||
<property name="AccountManager" ref="accountManager"/>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
|
||||
<class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate.Integration.Tests"
|
||||
table="Credits" lazy="false">
|
||||
<id name="CreditID" column="CreditID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="CreditAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
|
||||
<class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate.Integration.Tests"
|
||||
table="Debits" lazy="false">
|
||||
<id name="DebitID" column="DebitID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="DebitAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,339 +1,339 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright © 2002-2011 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using log4net;
|
||||
using log4net.Config;
|
||||
using NHibernate;
|
||||
using NUnit.Framework;
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Transaction;
|
||||
using Spring.Transaction.Interceptor;
|
||||
using System.Transactions;
|
||||
using System.Collections.Generic;
|
||||
using Spring.Core.IO;
|
||||
using NHibernate.Cfg;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
/// <summary>
|
||||
/// Use of Hibernate Template against database.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack (.NET)</author>
|
||||
[TestFixture]
|
||||
[Ignore("Bug Fix in Progress...unignore once resolved and tests are cleaned up")]
|
||||
public class HibernateTxScopeTransactionManagerTests
|
||||
{
|
||||
/// <summary>
|
||||
/// The shared <see cref="log4net.ILog"/> instance for this class (and derived classes).
|
||||
/// </summary>
|
||||
protected static readonly ILog log =
|
||||
LogManager.GetLogger(typeof(HibernateTxScopeTransactionManagerTests));
|
||||
|
||||
private IApplicationContext ctx;
|
||||
|
||||
private IDbProvider dbProvider;
|
||||
|
||||
private IPlatformTransactionManager transactionManager;
|
||||
|
||||
[Test]
|
||||
public void CanProperlyReleaseConnectionsWhenTransactionsAreRolledBack()
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
DoSave(true);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Test harness left in place to demonstrate the leaking connection issue present in NH2.1 and later")]
|
||||
public void DoesNotLeakConnection()
|
||||
{
|
||||
DoPreventConnectionLeaksPreventionPattern();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Test harness left in place to demonstrate the leaking connection issue present in NH2.1 and later")]
|
||||
public void LeaksConnection()
|
||||
{
|
||||
DoConnectionLeakingAntiPattern();
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
//NamespaceParserRegistry.RegisterParser(typeof(DatabaseNamespaceParser));
|
||||
BasicConfigurator.Configure();
|
||||
string assemblyName = GetType().Assembly.GetName().Name;
|
||||
ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/HibernateTxScopeTransactionManagerTests.xml");
|
||||
|
||||
dbProvider = ctx["DbProvider"] as IDbProvider;
|
||||
transactionManager = ctx["transactionManager"] as IPlatformTransactionManager;
|
||||
CleanupDatabase(dbProvider.CreateConnection());
|
||||
}
|
||||
|
||||
private static void CleanupDatabase(IDbConnection conn)
|
||||
{
|
||||
conn.Open();
|
||||
using (conn)
|
||||
{
|
||||
ExecuteSql(conn, "delete credits");
|
||||
ExecuteSql(conn, "delete debits");
|
||||
ExecuteSql(conn, "delete TestObjects");
|
||||
ExecuteSql(conn, "insert TestObjects(Age,Name) Values(5, 'Gabriel')");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this method will fail the test as it follows the anti-pattern of failing to use the (mandatory) NH Transaction to wrap the session call
|
||||
/// </summary>
|
||||
private void DoConnectionLeakingAntiPattern()
|
||||
{
|
||||
//this counter must be larger than the 'Max Pool Size' setting in the connection string for this test to demonstrate the issue
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
IList<TestObject> to = session.CreateCriteria<TestObject>().List<TestObject>();
|
||||
}
|
||||
|
||||
//because scope.Complete() is never called, the Transaction is rolled back and this results in the orpahned connections
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this method demonstrates the proper pattern to follow w NH 2.1 and later, mandating the use of an NH transaction wrapping the session
|
||||
/// </summary>
|
||||
private void DoPreventConnectionLeaksPreventionPattern()
|
||||
{
|
||||
//this counter must be larger than the 'Max Pool Size' setting in the connection string for this test to demonstrate the issue
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
using (ITransaction tx = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
IList<TestObject> to = session.CreateCriteria<TestObject>().List<TestObject>();
|
||||
throw new Exception("this exception simulates something going wrong!");
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
tx.Rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//because scope.Complete() is never called, the Transaction is rolled back but the presence of the NH transaction and its
|
||||
// associated Rollback() call will enable NH to properly release the connection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Transaction]
|
||||
private void DoSave(bool simulateException)
|
||||
{
|
||||
using (TransactionScope tx = new TransactionScope())
|
||||
{
|
||||
ISession s = ((ISessionFactory)ctx["SessionFactory"]).OpenSession();
|
||||
|
||||
TestObject to = new TestObject();
|
||||
to.Name = "George";
|
||||
to.Age = 33;
|
||||
|
||||
if (simulateException) { throw new Exception("Simulated Failure in Save Operation."); }
|
||||
|
||||
s.Save(to);
|
||||
|
||||
tx.Complete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void ExecuteSql(IDbConnection conn, string sql)
|
||||
{
|
||||
IDbCommand cmd;
|
||||
cmd = conn.CreateCommand();
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test2()
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
//DaoOperationsViaProxyFactoryWithTxAttributes();
|
||||
try
|
||||
{
|
||||
zzzExecuteDaoOperations();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void zzzExecuteDaoOperations()
|
||||
{
|
||||
ITestObjectDao dao = (ITestObjectDao)ctx["SimpleTestDao"];
|
||||
|
||||
TestObject toGeorge = new TestObject();
|
||||
toGeorge.Name = "George";
|
||||
toGeorge.Age = 33;
|
||||
dao.Create(toGeorge);
|
||||
}
|
||||
|
||||
|
||||
//private void MethodForThread()
|
||||
//{
|
||||
//
|
||||
// MethodForThread((0));
|
||||
//}
|
||||
|
||||
private void MethodForThread(object taskCounter)
|
||||
{
|
||||
int counter = (int)taskCounter;
|
||||
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.WriteLine(String.Format("Task: {0} | Loop Count: {1}", counter, i));
|
||||
zzzExecuteDaoOperations();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Debug.WriteLine(String.Format("\n---------\nCompleting Task Number {0}\n---------\n", taskCounter));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
BasicConfigurator.Configure();
|
||||
string assemblyName = GetType().Assembly.GetName().Name;
|
||||
ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/txScopeBugTests.xml");
|
||||
|
||||
dbProvider = ctx["DbProvider"] as IDbProvider;
|
||||
transactionManager = ctx["TransactionManager"] as IPlatformTransactionManager;
|
||||
CleanupDatabase(dbProvider.CreateConnection());
|
||||
|
||||
List<Thread> threads = new List<Thread>();
|
||||
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
int taskCounter = i;
|
||||
Debug.WriteLine(String.Format("\n---------\nSpawning Task Number {0}\n---------\n", taskCounter));
|
||||
|
||||
Thread t = new Thread(MethodForThread);
|
||||
threads.Add(t);
|
||||
t.Start(taskCounter);
|
||||
|
||||
}
|
||||
|
||||
foreach (Thread thread in threads)
|
||||
{
|
||||
thread.Join();
|
||||
}
|
||||
}
|
||||
|
||||
public void DoNothing()
|
||||
{
|
||||
ConfigurableResourceLoader loader = new ConfigurableResourceLoader();
|
||||
Configuration c = new Configuration();
|
||||
String resourceName =
|
||||
"assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml";
|
||||
c.AddInputStream(loader.GetResource(resourceName).InputStream);
|
||||
ISessionFactory sf = c.BuildSessionFactory();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void LeaksConnectionSampleCodeFromBlogPost()
|
||||
{
|
||||
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
/*
|
||||
IQuery q = session.CreateQuery("from Spring.Data.NHibernate.TestObject");
|
||||
q.List();
|
||||
*/
|
||||
|
||||
using (ITransaction transaction = session.BeginTransaction())
|
||||
{
|
||||
IQuery q = session.CreateQuery("from Spring.Data.NHibernate.TestObject");
|
||||
q.List();
|
||||
//transaction.Rollback();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright © 2002-2011 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using log4net;
|
||||
using log4net.Config;
|
||||
using NHibernate;
|
||||
using NUnit.Framework;
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Transaction;
|
||||
using Spring.Transaction.Interceptor;
|
||||
using System.Transactions;
|
||||
using System.Collections.Generic;
|
||||
using Spring.Core.IO;
|
||||
using NHibernate.Cfg;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
/// <summary>
|
||||
/// Use of Hibernate Template against database.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack (.NET)</author>
|
||||
[TestFixture]
|
||||
[Ignore("Bug Fix in Progress...unignore once resolved and tests are cleaned up")]
|
||||
public class HibernateTxScopeTransactionManagerTests
|
||||
{
|
||||
/// <summary>
|
||||
/// The shared <see cref="log4net.ILog"/> instance for this class (and derived classes).
|
||||
/// </summary>
|
||||
protected static readonly ILog log =
|
||||
LogManager.GetLogger(typeof(HibernateTxScopeTransactionManagerTests));
|
||||
|
||||
private IApplicationContext ctx;
|
||||
|
||||
private IDbProvider dbProvider;
|
||||
|
||||
private IPlatformTransactionManager transactionManager;
|
||||
|
||||
[Test]
|
||||
public void CanProperlyReleaseConnectionsWhenTransactionsAreRolledBack()
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
DoSave(true);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Test harness left in place to demonstrate the leaking connection issue present in NH2.1 and later")]
|
||||
public void DoesNotLeakConnection()
|
||||
{
|
||||
DoPreventConnectionLeaksPreventionPattern();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Test harness left in place to demonstrate the leaking connection issue present in NH2.1 and later")]
|
||||
public void LeaksConnection()
|
||||
{
|
||||
DoConnectionLeakingAntiPattern();
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
//NamespaceParserRegistry.RegisterParser(typeof(DatabaseNamespaceParser));
|
||||
BasicConfigurator.Configure();
|
||||
string assemblyName = GetType().Assembly.GetName().Name;
|
||||
ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/HibernateTxScopeTransactionManagerTests.xml");
|
||||
|
||||
dbProvider = ctx["DbProvider"] as IDbProvider;
|
||||
transactionManager = ctx["transactionManager"] as IPlatformTransactionManager;
|
||||
CleanupDatabase(dbProvider.CreateConnection());
|
||||
}
|
||||
|
||||
private static void CleanupDatabase(IDbConnection conn)
|
||||
{
|
||||
conn.Open();
|
||||
using (conn)
|
||||
{
|
||||
ExecuteSql(conn, "delete credits");
|
||||
ExecuteSql(conn, "delete debits");
|
||||
ExecuteSql(conn, "delete TestObjects");
|
||||
ExecuteSql(conn, "insert TestObjects(Age,Name) Values(5, 'Gabriel')");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this method will fail the test as it follows the anti-pattern of failing to use the (mandatory) NH Transaction to wrap the session call
|
||||
/// </summary>
|
||||
private void DoConnectionLeakingAntiPattern()
|
||||
{
|
||||
//this counter must be larger than the 'Max Pool Size' setting in the connection string for this test to demonstrate the issue
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
IList<TestObject> to = session.CreateCriteria<TestObject>().List<TestObject>();
|
||||
}
|
||||
|
||||
//because scope.Complete() is never called, the Transaction is rolled back and this results in the orpahned connections
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this method demonstrates the proper pattern to follow w NH 2.1 and later, mandating the use of an NH transaction wrapping the session
|
||||
/// </summary>
|
||||
private void DoPreventConnectionLeaksPreventionPattern()
|
||||
{
|
||||
//this counter must be larger than the 'Max Pool Size' setting in the connection string for this test to demonstrate the issue
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
using (ITransaction tx = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
IList<TestObject> to = session.CreateCriteria<TestObject>().List<TestObject>();
|
||||
throw new Exception("this exception simulates something going wrong!");
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
tx.Rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//because scope.Complete() is never called, the Transaction is rolled back but the presence of the NH transaction and its
|
||||
// associated Rollback() call will enable NH to properly release the connection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Transaction]
|
||||
private void DoSave(bool simulateException)
|
||||
{
|
||||
using (TransactionScope tx = new TransactionScope())
|
||||
{
|
||||
ISession s = ((ISessionFactory)ctx["SessionFactory"]).OpenSession();
|
||||
|
||||
TestObject to = new TestObject();
|
||||
to.Name = "George";
|
||||
to.Age = 33;
|
||||
|
||||
if (simulateException) { throw new Exception("Simulated Failure in Save Operation."); }
|
||||
|
||||
s.Save(to);
|
||||
|
||||
tx.Complete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void ExecuteSql(IDbConnection conn, string sql)
|
||||
{
|
||||
IDbCommand cmd;
|
||||
cmd = conn.CreateCommand();
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test2()
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
//DaoOperationsViaProxyFactoryWithTxAttributes();
|
||||
try
|
||||
{
|
||||
zzzExecuteDaoOperations();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void zzzExecuteDaoOperations()
|
||||
{
|
||||
ITestObjectDao dao = (ITestObjectDao)ctx["SimpleTestDao"];
|
||||
|
||||
TestObject toGeorge = new TestObject();
|
||||
toGeorge.Name = "George";
|
||||
toGeorge.Age = 33;
|
||||
dao.Create(toGeorge);
|
||||
}
|
||||
|
||||
|
||||
//private void MethodForThread()
|
||||
//{
|
||||
//
|
||||
// MethodForThread((0));
|
||||
//}
|
||||
|
||||
private void MethodForThread(object taskCounter)
|
||||
{
|
||||
int counter = (int)taskCounter;
|
||||
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.WriteLine(String.Format("Task: {0} | Loop Count: {1}", counter, i));
|
||||
zzzExecuteDaoOperations();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Debug.WriteLine(String.Format("\n---------\nCompleting Task Number {0}\n---------\n", taskCounter));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
BasicConfigurator.Configure();
|
||||
string assemblyName = GetType().Assembly.GetName().Name;
|
||||
ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/txScopeBugTests.xml");
|
||||
|
||||
dbProvider = ctx["DbProvider"] as IDbProvider;
|
||||
transactionManager = ctx["TransactionManager"] as IPlatformTransactionManager;
|
||||
CleanupDatabase(dbProvider.CreateConnection());
|
||||
|
||||
List<Thread> threads = new List<Thread>();
|
||||
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
int taskCounter = i;
|
||||
Debug.WriteLine(String.Format("\n---------\nSpawning Task Number {0}\n---------\n", taskCounter));
|
||||
|
||||
Thread t = new Thread(MethodForThread);
|
||||
threads.Add(t);
|
||||
t.Start(taskCounter);
|
||||
|
||||
}
|
||||
|
||||
foreach (Thread thread in threads)
|
||||
{
|
||||
thread.Join();
|
||||
}
|
||||
}
|
||||
|
||||
public void DoNothing()
|
||||
{
|
||||
ConfigurableResourceLoader loader = new ConfigurableResourceLoader();
|
||||
Configuration c = new Configuration();
|
||||
String resourceName =
|
||||
"assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml";
|
||||
c.AddInputStream(loader.GetResource(resourceName).InputStream);
|
||||
ISessionFactory sf = c.BuildSessionFactory();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void LeaksConnectionSampleCodeFromBlogPost()
|
||||
{
|
||||
|
||||
int counter = 200;
|
||||
|
||||
for (int i = 0; i < counter; i++)
|
||||
{
|
||||
|
||||
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
|
||||
{
|
||||
using (ISession session = ((ISessionFactory)ctx["SessionFactory"]).OpenSession())
|
||||
{
|
||||
/*
|
||||
IQuery q = session.CreateQuery("from Spring.Data.NHibernate.TestObject");
|
||||
q.List();
|
||||
*/
|
||||
|
||||
using (ITransaction transaction = session.BeginTransaction())
|
||||
{
|
||||
IQuery q = session.CreateQuery("from Spring.Data.NHibernate.TestObject");
|
||||
q.List();
|
||||
//transaction.Rollback();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
<!-- NOTE: Critical that the Max Pool Size parameter is present in the connection string to limit conn pool size for these tests-->
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False;Max Pool Size=10;"/>
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
<entry key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTxScopeTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven />
|
||||
|
||||
</objects>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
<!-- NOTE: Critical that the Max Pool Size parameter is present in the connection string to limit conn pool size for these tests-->
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False;Max Pool Size=10;"/>
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
<entry key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTxScopeTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven />
|
||||
|
||||
</objects>
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
public interface IAccountController
|
||||
{
|
||||
void DoWork();
|
||||
}
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
public interface IAccountController
|
||||
{
|
||||
void DoWork();
|
||||
}
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider1"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<db:provider id="DbProvider2"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Database=Spring2;User ID=springqa2;Password=springqa2;Trusted_Connection=False"/>
|
||||
|
||||
<object id="SessionFactory1" type="Spring.Data.NHibernate.LocalSessionFactoryObject">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider1"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="SessionFactory2" type="Spring.Data.NHibernate.LocalSessionFactoryObject">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider2"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="transactionManager"
|
||||
type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao">
|
||||
<property name="SessionFactory" ref="SessionFactory1"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao">
|
||||
<property name="SessionFactory" ref="SessionFactory2"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="transactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -60,7 +60,7 @@ namespace Spring.Data.NHibernate
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DbProviderTransalation()
|
||||
public void DbProviderTranslation()
|
||||
{
|
||||
|
||||
ISessionFactory sf = ctx["SessionFactory"] as ISessionFactory;
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
|
||||
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="AuditDao" type="Spring.Data.NHibernate.AuditDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager">
|
||||
<!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from
|
||||
the session factory. -->
|
||||
<!-- Set the DbProvider explicitly if you would like to have ADO.NET and NHibernate
|
||||
operations take place within the same transaction. -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,52 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
<tx:attribute-driven/>
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<!--
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
-->
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<!--
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
<tx:attribute-driven/>
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Data.NHibernate.AccountManager">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<!--
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
-->
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<!--
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,61 +1,61 @@
|
||||
using System;
|
||||
using NHibernate;
|
||||
using Spring.Transaction.Interceptor;
|
||||
using System.Threading;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
[Transaction]
|
||||
public class SimpleTestDao : ITestObjectDao
|
||||
{
|
||||
|
||||
private int _secondsToSleepBeforeException;
|
||||
public int SecondsToSleepBeforeException
|
||||
{
|
||||
get { return _secondsToSleepBeforeException; }
|
||||
set
|
||||
{
|
||||
_secondsToSleepBeforeException = value * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ISessionFactory SessionFactory
|
||||
{
|
||||
get { return sessionFactory; }
|
||||
set { sessionFactory = value; }
|
||||
}
|
||||
|
||||
private ISessionFactory sessionFactory;
|
||||
|
||||
[Transaction]
|
||||
public void Create(TestObject to)
|
||||
{
|
||||
sessionFactory.GetCurrentSession().FlushMode = FlushMode.Always;
|
||||
sessionFactory.GetCurrentSession().Save(to);
|
||||
Thread.Sleep(_secondsToSleepBeforeException);
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public void Update(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Delete(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public TestObject FindByName(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CreateUpdateRollback(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NHibernate;
|
||||
using Spring.Transaction.Interceptor;
|
||||
using System.Threading;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
[Transaction]
|
||||
public class SimpleTestDao : ITestObjectDao
|
||||
{
|
||||
|
||||
private int _secondsToSleepBeforeException;
|
||||
public int SecondsToSleepBeforeException
|
||||
{
|
||||
get { return _secondsToSleepBeforeException; }
|
||||
set
|
||||
{
|
||||
_secondsToSleepBeforeException = value * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ISessionFactory SessionFactory
|
||||
{
|
||||
get { return sessionFactory; }
|
||||
set { sessionFactory = value; }
|
||||
}
|
||||
|
||||
private ISessionFactory sessionFactory;
|
||||
|
||||
[Transaction]
|
||||
public void Create(TestObject to)
|
||||
{
|
||||
sessionFactory.GetCurrentSession().FlushMode = FlushMode.Always;
|
||||
sessionFactory.GetCurrentSession().Save(to);
|
||||
Thread.Sleep(_secondsToSleepBeforeException);
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public void Update(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Delete(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public TestObject FindByName(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CreateUpdateRollback(TestObject to)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate.Integration.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
|
||||
<object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data">
|
||||
<property name="TargetDbProvider" ref="targetDbProvider"/>
|
||||
<property name="Username" value="User ID=defaultName"/>
|
||||
<property name="Password" value="Password=defaultPass"/>
|
||||
</object>
|
||||
|
||||
<db:provider id="targetDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Trusted_Connection=False"/>
|
||||
|
||||
|
||||
<db:provider id="standardDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Trusted_Connection=False;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<!-- use connection provided by DbProvider
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
-->
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
-->
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
<!--
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="OracleODP-2.0"
|
||||
connectionString="Data Source=AGORA; User Id=agora_user; Password=welcome_bad"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject">
|
||||
<!-- TODO Provide dedicated NHibernate Schema -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using transaction attributes -->
|
||||
<object id="testObjectDaoViaTxAttributes"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource" />
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,63 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!--<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=rewards;Integrated Security=True;Max Pool Size=10"/>-->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local)\sql2005;Initial Catalog=rewards;user id=sa;password=password"/>
|
||||
|
||||
<!--<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARK6500\NR2007;Initial Catalog=spring;user id=springqa;password=springqa;Max Pool Size=10"/>-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="ExposeTransactionAwareSessionFactory" value="true" />
|
||||
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id="SimpleTestDao" type="Spring.Data.NHibernate.SimpleTestDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
<property name="SecondsToSleepBeforeException" value="0" />
|
||||
</object>
|
||||
|
||||
|
||||
<!--<object id="TransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>-->
|
||||
|
||||
<!--<object id="TransactionManager" type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data" />-->
|
||||
|
||||
|
||||
|
||||
<object id="TransactionManager" type="Spring.Data.NHibernate.HibernateTxScopeTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="TransactionManager"/>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!--<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=rewards;Integrated Security=True;Max Pool Size=10"/>-->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local)\sql2005;Initial Catalog=rewards;user id=sa;password=password"/>
|
||||
|
||||
<!--<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARK6500\NR2007;Initial Catalog=spring;user id=springqa;password=springqa;Max Pool Size=10"/>-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="ExposeTransactionAwareSessionFactory" value="true" />
|
||||
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id="SimpleTestDao" type="Spring.Data.NHibernate.SimpleTestDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
<property name="SecondsToSleepBeforeException" value="0" />
|
||||
</object>
|
||||
|
||||
|
||||
<!--<object id="TransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>-->
|
||||
|
||||
<!--<object id="TransactionManager" type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data" />-->
|
||||
|
||||
|
||||
|
||||
<object id="TransactionManager" type="Spring.Data.NHibernate.HibernateTxScopeTransactionManager, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="TransactionManager"/>
|
||||
|
||||
</objects>
|
||||
@@ -1,114 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="hibernate-configuration"
|
||||
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
|
||||
<section name="log4net"
|
||||
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
|
||||
</configSections>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="TestConnectionString"
|
||||
connectionString="TestConnectionString-TestConnectionString" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v1.1.4322">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v2.0.50727">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- The assembly binding for FirebirdClient ADO.NET 2.0 DataProvider -->
|
||||
<qualifyAssembly partialName="FirebirdSql.Data.FirebirdClient" fullName="FirebirdSql.Data.FirebirdClient, Version=2.1.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
|
||||
|
||||
<!-- Spring.NET uses a new version of NUnit -->
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.5.7.10213"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
|
||||
</runtime>
|
||||
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
|
||||
<bytecode-provider type="lcg"/>
|
||||
<reflection-optimizer use="true"/>
|
||||
<session-factory name="NHibernate.Test">
|
||||
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
|
||||
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
|
||||
<property name="cache.use_query_cache">true</property>
|
||||
<property name="query.startup_check">false</property>
|
||||
<!--
|
||||
The valid strings for Isolation can be found in the documentation for the System.Data.IsolationLevel
|
||||
Enumeration documentation.
|
||||
Use the member names - not the values.
|
||||
-->
|
||||
<property name="adonet.batch_size">10</property>
|
||||
<property name="connection.isolation">ReadCommitted</property>
|
||||
<property name="hbm2ddl.keywords">none</property>
|
||||
<property name="format_sql">true</property>
|
||||
|
||||
<!-- This is the System.Data.dll provider for MSSQL Server -->
|
||||
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
|
||||
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
|
||||
<property name="connection.connection_string">Server=SPRINGQA;initial catalog=nhibernate;Integrated Security=SSPI</property>
|
||||
|
||||
<property name="show_sql">false</property>
|
||||
<property name="use_outer_join">true</property>
|
||||
<property name="command_timeout">444</property>
|
||||
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
|
||||
<property name="adonet.wrap_result_sets">false</property>
|
||||
|
||||
<!-- <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>-->
|
||||
<property name="proxyfactory.factory_class">Spring.Data.NHibernate.Bytecode.ProxyFactoryFactory, Spring.Data.NHibernate21</property>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
||||
<log4net>
|
||||
<!-- Define some output appenders -->
|
||||
<appender name="trace"
|
||||
type="log4net.Appender.TraceAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="console"
|
||||
type="log4net.Appender.ConsoleAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="WARN" />
|
||||
<appender-ref ref="trace" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<logger name="NHibernate.Hql.Ast.ANTLR">
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.SQL">
|
||||
<level value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||
<level value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.Tool.hbm2ddl.SchemaExport">
|
||||
<level value="ERROR" />
|
||||
</logger>
|
||||
|
||||
</log4net>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="hibernate-configuration"
|
||||
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
|
||||
<section name="log4net"
|
||||
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
|
||||
</configSections>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="TestConnectionString"
|
||||
connectionString="TestConnectionString-TestConnectionString" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v1.1.4322">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v2.0.50727">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- The assembly binding for FirebirdClient ADO.NET 2.0 DataProvider -->
|
||||
<qualifyAssembly partialName="FirebirdSql.Data.FirebirdClient" fullName="FirebirdSql.Data.FirebirdClient, Version=2.1.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
|
||||
|
||||
<!-- Spring.NET uses a new version of NUnit -->
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.5.7.10213"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
|
||||
</runtime>
|
||||
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
|
||||
<bytecode-provider type="lcg"/>
|
||||
<reflection-optimizer use="true"/>
|
||||
<session-factory name="NHibernate.Test">
|
||||
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
|
||||
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
|
||||
<property name="cache.use_query_cache">true</property>
|
||||
<property name="query.startup_check">false</property>
|
||||
<!--
|
||||
The valid strings for Isolation can be found in the documentation for the System.Data.IsolationLevel
|
||||
Enumeration documentation.
|
||||
Use the member names - not the values.
|
||||
-->
|
||||
<property name="adonet.batch_size">10</property>
|
||||
<property name="connection.isolation">ReadCommitted</property>
|
||||
<property name="hbm2ddl.keywords">none</property>
|
||||
<property name="format_sql">true</property>
|
||||
|
||||
<!-- This is the System.Data.dll provider for MSSQL Server -->
|
||||
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
|
||||
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
|
||||
<property name="connection.connection_string">Server=SPRINGQA;initial catalog=nhibernate;Integrated Security=SSPI</property>
|
||||
|
||||
<property name="show_sql">false</property>
|
||||
<property name="use_outer_join">true</property>
|
||||
<property name="command_timeout">444</property>
|
||||
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
|
||||
<property name="adonet.wrap_result_sets">false</property>
|
||||
|
||||
<!-- <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>-->
|
||||
<property name="proxyfactory.factory_class">Spring.Data.NHibernate.Bytecode.ProxyFactoryFactory, Spring.Data.NHibernate21</property>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
||||
<log4net>
|
||||
<!-- Define some output appenders -->
|
||||
<appender name="trace"
|
||||
type="log4net.Appender.TraceAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="console"
|
||||
type="log4net.Appender.ConsoleAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="WARN" />
|
||||
<appender-ref ref="trace" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<logger name="NHibernate.Hql.Ast.ANTLR">
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.SQL">
|
||||
<level value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||
<level value="OFF" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.Tool.hbm2ddl.SchemaExport">
|
||||
<level value="ERROR" />
|
||||
</logger>
|
||||
|
||||
</log4net>
|
||||
</configuration>
|
||||
@@ -1,10 +1,10 @@
|
||||
Running NHibernate.Tests against Spring.Data.NHibernate21 from within VS:
|
||||
|
||||
Open "Project Properties", "Debug" Section and enter
|
||||
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>..\..\build-support\tools\nunit\net-2.0\nunit-console-x86.exe</StartProgram>
|
||||
<StartArguments>NHibernate.Test.dll /nologo /wait</StartArguments>
|
||||
|
||||
|
||||
Running NHibernate.Tests against Spring.Data.NHibernate21 from within VS:
|
||||
|
||||
Open "Project Properties", "Debug" Section and enter
|
||||
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>..\..\build-support\tools\nunit\net-2.0\nunit-console-x86.exe</StartProgram>
|
||||
<StartArguments>NHibernate.Test.dll /nologo /wait</StartArguments>
|
||||
|
||||
|
||||
To run the tests hit F5
|
||||
@@ -1,42 +1,42 @@
|
||||
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Spring')
|
||||
BEGIN
|
||||
ALTER DATABASE Spring
|
||||
SET SINGLE_USER
|
||||
WITH ROLLBACK IMMEDIATE
|
||||
|
||||
DROP DATABASE Spring
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'NHibernate')
|
||||
BEGIN
|
||||
ALTER DATABASE NHibernate
|
||||
SET SINGLE_USER
|
||||
WITH ROLLBACK IMMEDIATE
|
||||
|
||||
DROP DATABASE NHibernate
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'springqa2')
|
||||
DROP LOGIN [springqa2]
|
||||
GO
|
||||
|
||||
CREATE DATABASE Spring
|
||||
GO
|
||||
CREATE DATABASE NHibernate
|
||||
GO
|
||||
|
||||
CREATE LOGIN [springqa2] WITH PASSWORD=N'springqa2', DEFAULT_DATABASE=[Spring], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF
|
||||
|
||||
GO
|
||||
|
||||
USE Spring
|
||||
CREATE USER [springqa2] FOR LOGIN [springqa2] WITH DEFAULT_SCHEMA=[dbo]
|
||||
EXEC sp_addrolemember 'db_owner', 'springqa2'
|
||||
GO
|
||||
|
||||
-- ALTERNATIVELY JUST DROP ALL TABLES:
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL';
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL';
|
||||
-- EXEC sp_MSForEachTable 'DROP TABLE ?';
|
||||
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Spring')
|
||||
BEGIN
|
||||
ALTER DATABASE Spring
|
||||
SET SINGLE_USER
|
||||
WITH ROLLBACK IMMEDIATE
|
||||
|
||||
DROP DATABASE Spring
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'NHibernate')
|
||||
BEGIN
|
||||
ALTER DATABASE NHibernate
|
||||
SET SINGLE_USER
|
||||
WITH ROLLBACK IMMEDIATE
|
||||
|
||||
DROP DATABASE NHibernate
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'springqa2')
|
||||
DROP LOGIN [springqa2]
|
||||
GO
|
||||
|
||||
CREATE DATABASE Spring
|
||||
GO
|
||||
CREATE DATABASE NHibernate
|
||||
GO
|
||||
|
||||
CREATE LOGIN [springqa2] WITH PASSWORD=N'springqa2', DEFAULT_DATABASE=[Spring], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF
|
||||
|
||||
GO
|
||||
|
||||
USE Spring
|
||||
CREATE USER [springqa2] FOR LOGIN [springqa2] WITH DEFAULT_SCHEMA=[dbo]
|
||||
EXEC sp_addrolemember 'db_owner', 'springqa2'
|
||||
GO
|
||||
|
||||
-- ALTERNATIVELY JUST DROP ALL TABLES:
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL';
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL';
|
||||
-- EXEC sp_MSForEachTable 'DROP TABLE ?';
|
||||
@@ -1,5 +1,5 @@
|
||||
#region License
|
||||
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
@@ -14,47 +14,47 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Core.IO;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Data.Core;
|
||||
using Spring.Testing.Ado;
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
[SetUpFixture]
|
||||
public class Setup
|
||||
{
|
||||
private const string DBConnection = "Data Source=SPRINGQA;Database=$DATABASE$;Trusted_Connection=False;User ID=springqa;Password=springqa";
|
||||
private readonly IResourceLoader resourceLoader = new ConfigurableResourceLoader();
|
||||
|
||||
private IResource GetResource(object instance, string name)
|
||||
{
|
||||
string resourcePath = TestResourceLoader.GetAssemblyResourceUri(instance, name);
|
||||
return resourceLoader.GetResource(resourcePath);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void InstallMSSQLDatabase()
|
||||
{
|
||||
IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SqlServer-2.0");
|
||||
AdoTemplate ado = new AdoTemplate(dbProvider);
|
||||
|
||||
// (re-)create database(s)
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "master");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "RecreateDatabases.sql"));
|
||||
|
||||
// create tables
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "Spring");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/creditdebit.sql"));
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/testObject.sql"));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Core.IO;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Data.Core;
|
||||
using Spring.Testing.Ado;
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
[SetUpFixture]
|
||||
public class Setup
|
||||
{
|
||||
private const string DBConnection = "Data Source=SPRINGQA;Database=$DATABASE$;Trusted_Connection=False;User ID=springqa;Password=springqa";
|
||||
private readonly IResourceLoader resourceLoader = new ConfigurableResourceLoader();
|
||||
|
||||
private IResource GetResource(object instance, string name)
|
||||
{
|
||||
string resourcePath = TestResourceLoader.GetAssemblyResourceUri(instance, name);
|
||||
return resourceLoader.GetResource(resourcePath);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void InstallMSSQLDatabase()
|
||||
{
|
||||
IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SqlServer-2.0");
|
||||
AdoTemplate ado = new AdoTemplate(dbProvider);
|
||||
|
||||
// (re-)create database(s)
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "master");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "RecreateDatabases.sql"));
|
||||
|
||||
// create tables
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "Spring");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/creditdebit.sql"));
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/testObject.sql"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
|
||||
<session-factory name="NHibernate.Test">
|
||||
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
|
||||
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
|
||||
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
|
||||
<property name="connection.connection_string">Server=localhost;initial catalog=nhibernate;User Id=;Password=</property>
|
||||
<property name="query.substitutions">true 1, false 0, yes 1, no 0</property>
|
||||
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
|
||||
</session-factory>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
|
||||
<session-factory name="NHibernate.Test">
|
||||
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
|
||||
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
|
||||
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
|
||||
<property name="connection.connection_string">Server=localhost;initial catalog=nhibernate;User Id=;Password=</property>
|
||||
<property name="query.substitutions">true 1, false 0, yes 1, no 0</property>
|
||||
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
@@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<object name="transactionManager" type="Spring.Transaction.CallCountingTransactionManager, Spring.Data.Tests"/>
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAroundAdvice</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<!--
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="transactionManager"/>
|
||||
<property name="Target" ref="SimpleService"/>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ISimpleService"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
-->
|
||||
|
||||
</objects>
|
||||
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx"
|
||||
xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object name="hibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate, Spring.Data.NHibernate">
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<!-- once add 'internal' role for autoproxycreator that is created via the tx:attribute-driven element -->
|
||||
<!-- then we can add advisors to the config and have them picked up by any 'user' role defined autoproxycreators -->
|
||||
|
||||
<object id="loggingAdvisor" type="Spring.Aop.Support.NameMatchMethodPointcutAdvisor, Spring.Aop">
|
||||
<property name="Advice">
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
</property>
|
||||
<property name="MappedNames">
|
||||
<list>
|
||||
<value>12341234asdf*</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAdvisor</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,49 +1,49 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using NhCfg = NHibernate.Cfg;
|
||||
using NHibernate;
|
||||
using System.Collections;
|
||||
using Spring.Data.Common;
|
||||
using NHibernate.Dialect;
|
||||
using Spring.Context.Support;
|
||||
using NHibernate.Connection;
|
||||
using NHibernate.Driver;
|
||||
using Spring.Data.NHibernate.Bytecode;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class DelegatingLocalSessionFactoryObjectTests
|
||||
{
|
||||
[Test]
|
||||
public void CanSetConfigurationAndProperties()
|
||||
{
|
||||
IDbProvider dbProvider = DbProviderFactory.GetDbProvider("System.Data.SqlClient");
|
||||
dbProvider.ConnectionString = "Data Source=(local);Database=Spring;Trusted_Connection=false";
|
||||
DelegatingLocalSessionFactoryObject lsfo = new DelegatingLocalSessionFactoryObject();
|
||||
lsfo.DbProvider = dbProvider;
|
||||
lsfo.ApplicationContext = new StaticApplicationContext();
|
||||
|
||||
IDictionary properties = new Hashtable();
|
||||
properties.Add(NhCfg.Environment.Dialect, typeof(MsSql2000Dialect).AssemblyQualifiedName);
|
||||
properties.Add(NhCfg.Environment.ConnectionDriver, typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
properties.Add(NhCfg.Environment.ConnectionProvider, typeof(DriverConnectionProvider).AssemblyQualifiedName);
|
||||
|
||||
properties.Add(NhCfg.Environment.Hbm2ddlKeyWords, "none");
|
||||
|
||||
lsfo.HibernateProperties = properties;
|
||||
lsfo.AfterPropertiesSet();
|
||||
|
||||
Assert.IsNotNull(lsfo.Configuration);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ConnectionProvider], typeof(DriverConnectionProvider).AssemblyQualifiedName);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ConnectionDriver], typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.Dialect], typeof(MsSql2000Dialect).AssemblyQualifiedName);
|
||||
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ProxyFactoryFactoryClass], typeof(ProxyFactoryFactory).AssemblyQualifiedName);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using NhCfg = NHibernate.Cfg;
|
||||
using NHibernate;
|
||||
using System.Collections;
|
||||
using Spring.Data.Common;
|
||||
using NHibernate.Dialect;
|
||||
using Spring.Context.Support;
|
||||
using NHibernate.Connection;
|
||||
using NHibernate.Driver;
|
||||
using Spring.Data.NHibernate.Bytecode;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class DelegatingLocalSessionFactoryObjectTests
|
||||
{
|
||||
[Test]
|
||||
public void CanSetConfigurationAndProperties()
|
||||
{
|
||||
IDbProvider dbProvider = DbProviderFactory.GetDbProvider("System.Data.SqlClient");
|
||||
dbProvider.ConnectionString = "Data Source=(local);Database=Spring;Trusted_Connection=false";
|
||||
DelegatingLocalSessionFactoryObject lsfo = new DelegatingLocalSessionFactoryObject();
|
||||
lsfo.DbProvider = dbProvider;
|
||||
lsfo.ApplicationContext = new StaticApplicationContext();
|
||||
|
||||
IDictionary properties = new Hashtable();
|
||||
properties.Add(NhCfg.Environment.Dialect, typeof(MsSql2000Dialect).AssemblyQualifiedName);
|
||||
properties.Add(NhCfg.Environment.ConnectionDriver, typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
properties.Add(NhCfg.Environment.ConnectionProvider, typeof(DriverConnectionProvider).AssemblyQualifiedName);
|
||||
|
||||
properties.Add(NhCfg.Environment.Hbm2ddlKeyWords, "none");
|
||||
|
||||
lsfo.HibernateProperties = properties;
|
||||
lsfo.AfterPropertiesSet();
|
||||
|
||||
Assert.IsNotNull(lsfo.Configuration);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ConnectionProvider], typeof(DriverConnectionProvider).AssemblyQualifiedName);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ConnectionDriver], typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.Dialect], typeof(MsSql2000Dialect).AssemblyQualifiedName);
|
||||
|
||||
Assert.AreEqual(lsfo.Configuration.Properties[NhCfg.Environment.ProxyFactoryFactoryClass], typeof(ProxyFactoryFactory).AssemblyQualifiedName);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -436,11 +436,7 @@ namespace Spring.Data.NHibernate
|
||||
LastCall.On(session).Repeat.Twice();
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
#if NH_2_0
|
||||
Expect.Call(session.Close()).Return(null).Repeat.Once();
|
||||
#else
|
||||
Expect.Call(session.Close()).Return(null).Repeat.Twice();
|
||||
#endif
|
||||
//}
|
||||
mocks.ReplayAll();
|
||||
|
||||
@@ -476,10 +472,6 @@ namespace Spring.Data.NHibernate
|
||||
LastCall.IgnoreArguments();
|
||||
session.FlushMode = FlushMode.Never;
|
||||
Expect.Call(session.FlushMode).Return(FlushMode.Never);
|
||||
#if NH_2_0
|
||||
#else
|
||||
Expect.Call(session.Close()).Return(null);
|
||||
#endif
|
||||
|
||||
mocks.ReplayAll();
|
||||
|
||||
@@ -618,11 +610,7 @@ namespace Spring.Data.NHibernate
|
||||
}
|
||||
else
|
||||
{
|
||||
#if NH_2_0 || NH_2_1
|
||||
rootCause = new PropertyValueException("mymsg", typeof(string).Name, "Name");
|
||||
#else
|
||||
rootCause = new PropertyValueException("mymsg", typeof(string), "Name");
|
||||
#endif
|
||||
LastCall.On(transaction).Throw(rootCause);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
using NHibernate;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Connection;
|
||||
@@ -28,12 +29,9 @@ using NHibernate.Driver;
|
||||
|
||||
using Spring.Context.Support;
|
||||
using Spring.Data.Common;
|
||||
|
||||
using NUnit.Framework;
|
||||
#if NH_2_1
|
||||
using Spring.Data.NHibernate.Bytecode;
|
||||
|
||||
#endif
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Spring.Data.NHibernate
|
||||
{
|
||||
@@ -59,11 +57,9 @@ namespace Spring.Data.NHibernate
|
||||
properties.Add(Environment.ConnectionDriver, typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
properties.Add(Environment.ConnectionProvider, typeof(DriverConnectionProvider).AssemblyQualifiedName);
|
||||
|
||||
#if NH_2_1
|
||||
// since 2.1. "hbm2ddl.keywords = 'keywords'" is the default which causes the SessionFactory to connect to the db upon creation
|
||||
// we don't want this in this unit test
|
||||
properties.Add(Environment.Hbm2ddlKeyWords, "none");
|
||||
#endif
|
||||
sfo.HibernateProperties = properties;
|
||||
sfo.AfterPropertiesSet();
|
||||
|
||||
@@ -72,11 +68,9 @@ namespace Spring.Data.NHibernate
|
||||
Assert.AreEqual(sfo.Configuration.Properties[Environment.ConnectionDriver], typeof(SqlClientDriver).AssemblyQualifiedName);
|
||||
Assert.AreEqual(sfo.Configuration.Properties[Environment.Dialect], typeof(MsSql2000Dialect).AssemblyQualifiedName);
|
||||
|
||||
#if NH_2_1
|
||||
Assert.AreEqual(sfo.Configuration.Properties[Environment.ProxyFactoryFactoryClass], typeof(ProxyFactoryFactory).AssemblyQualifiedName);
|
||||
// Spring's IBytecodeProvider should be the default
|
||||
// Assert.AreEqual(typeof(BytecodeProvider), Environment.BytecodeProvider.GetType(), "default IBytecodeProvider was not Spring's BytecodeProvider");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -101,6 +95,4 @@ namespace Spring.Data.NHibernate
|
||||
sfo.AfterPropertiesSet();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,43 +1,43 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,45 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate20.Integration.Tests"
|
||||
table="Credits" lazy="false">
|
||||
<id name="CreditID" column="CreditID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="CreditAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate20.Integration.Tests"
|
||||
table="Debits" lazy="false">
|
||||
<id name="DebitID" column="DebitID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="DebitAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider1"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<db:provider id="DbProvider2"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<object id="SessionFactory1" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider1"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate20.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="SessionFactory2" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider2"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate20.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="transactionManager"
|
||||
type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory1"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory2"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="transactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Initial Catalog=Spring;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
|
||||
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate20.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="AuditDao" type="Spring.Data.NHibernate.AuditDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
|
||||
<!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from
|
||||
the session factory. -->
|
||||
<!-- Set the DbProvider explicitly if you would like to have ADO.NET and NHibernate
|
||||
operations take place within the same transaction. -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate20.Integration.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
|
||||
<object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data">
|
||||
<property name="TargetDbProvider" ref="targetDbProvider"/>
|
||||
<property name="Username" value="User ID=defaultName"/>
|
||||
<property name="Password" value="Password=defaultPass"/>
|
||||
</object>
|
||||
|
||||
<db:provider id="targetDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Trusted_Connection=False"/>
|
||||
|
||||
|
||||
<db:provider id="standardDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Trusted_Connection=False;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<!-- use connection provided by DbProvider
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
-->
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
-->
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
<!--
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="OracleODP-2.0"
|
||||
connectionString="Data Source=AGORA; User Id=agora_user; Password=welcome_bad"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
<!-- TODO Provide dedicated NHibernate Schema -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using transaction attributes -->
|
||||
<object id="testObjectDaoViaTxAttributes"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource" />
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate20.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,29 +0,0 @@
|
||||
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Spring')
|
||||
BEGIN
|
||||
ALTER DATABASE Spring
|
||||
SET SINGLE_USER
|
||||
WITH ROLLBACK IMMEDIATE
|
||||
|
||||
DROP DATABASE Spring
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'springqa2')
|
||||
DROP LOGIN [springqa2]
|
||||
GO
|
||||
|
||||
CREATE DATABASE Spring
|
||||
GO
|
||||
|
||||
CREATE LOGIN [springqa2] WITH PASSWORD=N'springqa2', DEFAULT_DATABASE=[Spring], DEFAULT_LANGUAGE=[us_english]
|
||||
GO
|
||||
|
||||
USE Spring
|
||||
CREATE USER [springqa2] FOR LOGIN [springqa2] WITH DEFAULT_SCHEMA=[dbo]
|
||||
EXEC sp_addrolemember 'db_owner', 'springqa2'
|
||||
GO
|
||||
|
||||
-- ALTERNATIVELY JUST DROP ALL TABLES:
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL';
|
||||
-- EXEC sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL';
|
||||
-- EXEC sp_MSForEachTable 'DROP TABLE ?';
|
||||
@@ -1,190 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2F09404F-AC31-4AA8-BE8B-C5AF76797221}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate20.Integration.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.2.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\AccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\AccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountManager.cs">
|
||||
<Link>Data\NHibernate\AccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AuditDao.cs">
|
||||
<Link>Data\NHibernate\AuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Credit.cs">
|
||||
<Link>Data\NHibernate\Credit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\DbProviderTemplateTests.cs">
|
||||
<Link>Data\NHibernate\DbProviderTemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Debit.cs">
|
||||
<Link>Data\NHibernate\Debit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\IAccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\IAccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountManager.cs">
|
||||
<Link>Data\NHibernate\IAccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAuditDao.cs">
|
||||
<Link>Data\NHibernate\IAuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\MultipleDbTests.cs">
|
||||
<Link>Data\NHibernate\MultipleDbTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NativeNHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTests.cs">
|
||||
<Link>Data\NHibernate\NativeNHTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHDAOTests.cs">
|
||||
<Link>Data\NHibernate\NHDAOTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TemplateTests.cs">
|
||||
<Link>Data\NHibernate\TemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Setup.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\creditdebit.sql">
|
||||
<Link>Data\NHibernate\creditdebit.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RecreateDatabases.sql" />
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\testObject.sql">
|
||||
<Link>Data\NHibernate\testObject.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<None Include="Spring.Data.NHibernate20.Integration.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate20.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate20\Spring.Data.NHibernate20.2008.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate20.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj">
|
||||
<Project>{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\templateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Credit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\NHDAOTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Debit.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\MultipleDbTests.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Integration.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Integration.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate20.Integration.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* current.build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines for C# compiler
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- copy nh libs -->
|
||||
<echo message="NH Libs: ${nh20.lib.dir}" />
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${nh20.lib.dir}">
|
||||
<include name="**/*.dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- build Spring.Data.NHibernate20.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="../Spring.Data.NHibernate.Integration.Tests/**/*.cs" />
|
||||
<include name="**/*.cs" />
|
||||
<exclude name="AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate21*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate3*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
<resources prefix="Spring" dynamicprefix="true" basedir="../Spring.Data.NHibernate.Integration.Tests" failonempty="true">
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
</target>
|
||||
<target name="test" depends="build">
|
||||
<!-- call target="common.run-tests" if="${test.integration.data}" / -->
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
|
||||
<common>
|
||||
<logging>
|
||||
|
||||
<factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
|
||||
<arg key="level" value="INFO" />
|
||||
</factoryAdapter>
|
||||
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,5 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate assembly")]
|
||||
@@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate20.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<object name="transactionManager" type="Spring.Transaction.CallCountingTransactionManager, Spring.Data.Tests"/>
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate20.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAroundAdvice</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<!--
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="transactionManager"/>
|
||||
<property name="Target" ref="SimpleService"/>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ISimpleService"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
-->
|
||||
|
||||
</objects>
|
||||
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx"
|
||||
xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate20.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate20.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object name="hibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate, Spring.Data.NHibernate20">
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<!-- once add 'internal' role for autoproxycreator that is created via the tx:attribute-driven element -->
|
||||
<!-- then we can add advisors to the config and have them picked up by any 'user' role defined autoproxycreators -->
|
||||
|
||||
<object id="loggingAdvisor" type="Spring.Aop.Support.NameMatchMethodPointcutAdvisor, Spring.Aop">
|
||||
<property name="Advice">
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
</property>
|
||||
<property name="MappedNames">
|
||||
<list>
|
||||
<value>12341234asdf*</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAdvisor</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate20.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,43 +0,0 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2004 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Data.NHibernate;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{EACD4B0B-06F9-4A0C-B8E8-EBE6BB0A167F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate20.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.DynamicProxy2, Version=1.1.5.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.0.4.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate20.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate20.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate20\Spring.Data.NHibernate20.2008.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate20.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2008.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,159 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{EACD4B0B-06F9-4A0C-B8E8-EBE6BB0A167F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate20.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate20.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate20.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.DynamicProxy2, Version=1.1.5.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.0.4.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate20\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate20.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate20.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2010.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2010.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate20\Spring.Data.NHibernate20.2010.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate20.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2010.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2010.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2010.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate20.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate20.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate20.Tests" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- copy nh libs -->
|
||||
<echo message="NH Libs: ${nh20.lib.dir}" />
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${nh20.lib.dir}">
|
||||
<include name="**/*.dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="../Spring.Data.NHibernate.Tests/**/*.cs" />
|
||||
<include name="../Spring.Data.NHibernate12.Tests/**/*.cs" />
|
||||
<include name="**/*.cs" />
|
||||
<exclude name="../Spring.Data.NHibernate.Tests/Data/NHibernate/SessionFactoryUtilsTests.cs" />
|
||||
<exclude name="AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate21*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate3*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
|
||||
<call target="common.run-tests" />
|
||||
</target>
|
||||
<!--
|
||||
<target name="test" depends="build">
|
||||
<nunit2outproc>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll"
|
||||
appconfig="${current.bin.dir}/${project::get-name()}.dll.config" />
|
||||
</nunit2outproc>
|
||||
</target>
|
||||
-->
|
||||
|
||||
</project>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" />
|
||||
<parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate21.Integration.Tests"
|
||||
table="Credits" lazy="false">
|
||||
<id name="CreditID" column="CreditID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="CreditAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate21.Integration.Tests"
|
||||
table="Debits" lazy="false">
|
||||
<id name="DebitID" column="DebitID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="DebitAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider1"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<db:provider id="DbProvider2"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<object id="SessionFactory1" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider1"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate21.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="SessionFactory2" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider2"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate21.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="transactionManager"
|
||||
type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
|
||||
<property name="TransactionSynchronization" value="Always" />
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory1"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory2"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="transactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
<object id="transactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
<!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from
|
||||
the session factory. -->
|
||||
<!-- Set the DbProvider explicitly if you would like to have ADO.NET and NHibernate
|
||||
operations take place within the same transaction. -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
|
||||
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate21.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
<!-- provides integation with Spring's declarative transaction management features -->
|
||||
<property name="ExposeTransactionAwareSessionFactory" value="true" />
|
||||
</object>
|
||||
|
||||
<!-- DAOs -->
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="AuditDao" type="Spring.Data.NHibernate.AuditDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven/>
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
<object id="accountController" type="Spring.Data.NHibernate.AccountController, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="AccountManager" ref="accountManager"/>
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<!--
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
-->
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<!--
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate21.Integration.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
|
||||
<object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data">
|
||||
<property name="TargetDbProvider" ref="targetDbProvider"/>
|
||||
<property name="Username" value="User ID=springqa"/>
|
||||
<property name="Password" value="Password=springqa"/>
|
||||
</object>
|
||||
|
||||
<db:provider id="targetDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;Trusted_Connection=False"/>
|
||||
|
||||
|
||||
<db:provider id="standardDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;Trusted_Connection=False;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<!-- use connection provided by DbProvider
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
-->
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
-->
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,118 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
<!--
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="OracleODP-2.0"
|
||||
connectionString="Data Source=AGORA; User Id=agora_user; Password=welcome_bad"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<!-- TODO Provide dedicated NHibernate Schema -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using transaction attributes -->
|
||||
<object id="testObjectDaoViaTxAttributes"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource" />
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate21.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,60 +0,0 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Core.IO;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Data.Core;
|
||||
using Spring.Testing.Ado;
|
||||
|
||||
namespace Spring
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
[SetUpFixture]
|
||||
public class Setup
|
||||
{
|
||||
private const string DBConnection = "Data Source=SPRINGQA;Database=$DATABASE$;Trusted_Connection=False;User ID=springqa;Password=springqa";
|
||||
private readonly IResourceLoader resourceLoader = new ConfigurableResourceLoader();
|
||||
|
||||
private IResource GetResource(object instance, string name)
|
||||
{
|
||||
string resourcePath = TestResourceLoader.GetAssemblyResourceUri(instance, name);
|
||||
return resourceLoader.GetResource(resourcePath);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void InstallMSSQLDatabase()
|
||||
{
|
||||
IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SqlServer-2.0");
|
||||
AdoTemplate ado = new AdoTemplate(dbProvider);
|
||||
|
||||
// (re-)create database(s)
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "master");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "RecreateDatabases.sql"));
|
||||
|
||||
// create tables
|
||||
dbProvider.ConnectionString = DBConnection.Replace("$DATABASE$", "Spring");
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/creditdebit.sql"));
|
||||
SimpleAdoTestUtils.ExecuteSqlScript(ado, GetResource(this, "Data.NHibernate/testObject.sql"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{4A07E150-ED90-407C-8CAD-4760444DDFD9}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate21.Integration.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.2.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.DomainModel, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.DomainModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.Test, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.Test.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\AccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\AccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountManager.cs">
|
||||
<Link>Data\NHibernate\AccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AuditDao.cs">
|
||||
<Link>Data\NHibernate\AuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Credit.cs">
|
||||
<Link>Data\NHibernate\Credit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\DbProviderTemplateTests.cs">
|
||||
<Link>Data\NHibernate\DbProviderTemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Debit.cs">
|
||||
<Link>Data\NHibernate\Debit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\IAccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\IAccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountManager.cs">
|
||||
<Link>Data\NHibernate\IAccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAuditDao.cs">
|
||||
<Link>Data\NHibernate\IAuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\MultipleDbTests.cs">
|
||||
<Link>Data\NHibernate\MultipleDbTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NativeNHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTests.cs">
|
||||
<Link>Data\NHibernate\NativeNHTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHDAOTests.cs">
|
||||
<Link>Data\NHibernate\NHDAOTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TemplateTests.cs">
|
||||
<Link>Data\NHibernate\TemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Data\NHibernate\Bytecode\AbstractInjectableUserTypeFixture.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\Foo.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\IDelimiter.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\InjectableStringUserType.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\InjectableUserTypeFixture.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\NHibernateTestImports.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\Product.cs" />
|
||||
<Compile Include="Data\NHibernate\AccountController.cs" />
|
||||
<Compile Include="Data\NHibernate\IAccountController.cs" />
|
||||
<Compile Include="Setup.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\creditdebit.sql">
|
||||
<Link>Data\NHibernate\creditdebit.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RecreateDatabases.sql" />
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\testObject.sql">
|
||||
<Link>Data\NHibernate\testObject.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<None Include="NHibernate.Test.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Spring.Data.NHibernate21.Integration.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate21.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate21\Spring.Data.NHibernate21.2008.csproj">
|
||||
<Project>{E57B4652-0231-49CB-B058-87E10EFE540D}</Project>
|
||||
<Name>Spring.Data.NHibernate21.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj">
|
||||
<Project>{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Credit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Debit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\MultipleDbTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\NHDAOTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\templateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Data\NHibernate\Bytecode\Foo.Spechbm.xml" />
|
||||
<Content Include="TestEnbeddedConfig.cfg.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Config\Log4Net.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Data\NHibernate\Dao.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Services.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Controllers.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Data\NHibernate\Bytecode\Foo.Spechbm.xml" />
|
||||
<Content Include="TestEnbeddedConfig.cfg.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Integration.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Integration.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,237 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{4A07E150-ED90-407C-8CAD-4760444DDFD9}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate21.Integration.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_4_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_4_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.2.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.DomainModel, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.DomainModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.Test, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.Test.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\AccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\AccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountManager.cs">
|
||||
<Link>Data\NHibernate\AccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AuditDao.cs">
|
||||
<Link>Data\NHibernate\AuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Credit.cs">
|
||||
<Link>Data\NHibernate\Credit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\DbProviderTemplateTests.cs">
|
||||
<Link>Data\NHibernate\DbProviderTemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Debit.cs">
|
||||
<Link>Data\NHibernate\Debit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\IAccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\IAccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountManager.cs">
|
||||
<Link>Data\NHibernate\IAccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAuditDao.cs">
|
||||
<Link>Data\NHibernate\IAuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\MultipleDbTests.cs">
|
||||
<Link>Data\NHibernate\MultipleDbTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NativeNHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTests.cs">
|
||||
<Link>Data\NHibernate\NativeNHTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHDAOTests.cs">
|
||||
<Link>Data\NHibernate\NHDAOTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TemplateTests.cs">
|
||||
<Link>Data\NHibernate\TemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Data\NHibernate\Bytecode\AbstractInjectableUserTypeFixture.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\Foo.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\IDelimiter.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\InjectableStringUserType.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\InjectableUserTypeFixture.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\NHibernateTestImports.cs" />
|
||||
<Compile Include="Data\NHibernate\Bytecode\Product.cs" />
|
||||
<Compile Include="Data\NHibernate\AccountController.cs" />
|
||||
<Compile Include="Data\NHibernate\HibernateTxScopeTransactionManagerTests.cs" />
|
||||
<Compile Include="Data\NHibernate\IAccountController.cs" />
|
||||
<Compile Include="Data\NHibernate\SimpleTestDao.cs" />
|
||||
<Compile Include="Setup.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\creditdebit.sql">
|
||||
<Link>Data\NHibernate\creditdebit.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RecreateDatabases.sql" />
|
||||
<EmbeddedResource Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\testObject.sql">
|
||||
<Link>Data\NHibernate\testObject.sql</Link>
|
||||
</EmbeddedResource>
|
||||
<None Include="NHibernate.Test.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Spring.Data.NHibernate21.Integration.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate21.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2010.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2010.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate21\Spring.Data.NHibernate21.2010.csproj">
|
||||
<Project>{E57B4652-0231-49CB-B058-87E10EFE540D}</Project>
|
||||
<Name>Spring.Data.NHibernate21.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2010.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2010.csproj">
|
||||
<Project>{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2010.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Credit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Debit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\MultipleDbTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\NHDAOTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\templateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Data\NHibernate\Bytecode\Foo.Spechbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\HibernateTxScopeTransactionManagerTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\txScopeBugTests.xml" />
|
||||
<Content Include="TestEnbeddedConfig.cfg.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Config\Log4Net.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Data\NHibernate\Dao.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Services.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Controllers.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Data\NHibernate\Bytecode\Foo.Spechbm.xml" />
|
||||
<Content Include="TestEnbeddedConfig.cfg.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Integration.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Integration.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate21.Integration.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* current.build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines for C# compiler
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- copy nh libs -->
|
||||
<echo message="NH Libs: ${nh21.lib.dir}" />
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${nh21.lib.dir}">
|
||||
<include name="**/*.dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- build Spring.Data.NHibernate21.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="../Spring.Data.NHibernate.Integration.Tests/**/*.cs" />
|
||||
<include name="**/*.cs" />
|
||||
<exclude name="AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate20*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate3*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
<resources prefix="Spring" dynamicprefix="true" basedir="../Spring.Data.NHibernate.Integration.Tests" failonempty="true">
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
<include name="NHibernate.Test.dll.config" />
|
||||
<include name="TestEnbeddedConfig.cfg.xml" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<property name="test.assemblyfile" value="${project::get-name()}.dll" />
|
||||
<call target="common.run-tests" if="${test.integration.data}" />
|
||||
|
||||
<!-- 1) Test Failure : NHibernate.Test.CacheTest.TimestamperFixture.VerifyIncrease
|
||||
diff was 0. It should always increase. Loop i=4094 with currentTicks = 5152049817206783 and newTicks = 5152049817206783
|
||||
-->
|
||||
<!--
|
||||
<property name="test.assemblyfile" value="NHibernate.Test.dll" />
|
||||
<call target="common.run-tests" if="${test.integration.data}" />
|
||||
-->
|
||||
<!-- cleanup after NH tests - they unfortunately generate a bunch of assemblies as well -->
|
||||
<!--
|
||||
<delete>
|
||||
<fileset basedir="${current.bin.dir}">
|
||||
<include name="*.hbm.xml"/>
|
||||
<include name="My*.*"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
-->
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v1.1.4322">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v2.0.50727">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- The assembly binding for FirebirdClient ADO.NET 2.0 DataProvider -->
|
||||
<qualifyAssembly partialName="FirebirdSql.Data.FirebirdClient" fullName="FirebirdSql.Data.FirebirdClient, Version=2.1.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
|
||||
|
||||
<!-- Spring.NET uses a new version of NUnit -->
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.5.7.10213"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
|
||||
</runtime>
|
||||
|
||||
<common>
|
||||
<logging>
|
||||
<!--
|
||||
<factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
|
||||
<arg key="level" value="INFO" />
|
||||
</factoryAdapter>
|
||||
-->
|
||||
|
||||
<factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging">
|
||||
<arg key="level" value="INFO" />
|
||||
</factoryAdapter>
|
||||
|
||||
|
||||
<!--
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
|
||||
<arg key="configType" value="FILE-WATCH"/>
|
||||
<arg key="configFile" value="~/Config/Log4Net.xml"/>
|
||||
</factoryAdapter>
|
||||
-->
|
||||
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,5 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate assembly")]
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="hbm2ddl.keywords" value="none" />
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate21.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<object name="transactionManager" type="Spring.Transaction.CallCountingTransactionManager, Spring.Data.Tests"/>
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate21.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAroundAdvice</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<!--
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="transactionManager"/>
|
||||
<property name="Target" ref="SimpleService"/>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ISimpleService"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
-->
|
||||
|
||||
</objects>
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx"
|
||||
xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="hbm2ddl.keywords" value="none" />
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate21.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate21">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate21.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object name="hibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate, Spring.Data.NHibernate21">
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<!-- once add 'internal' role for autoproxycreator that is created via the tx:attribute-driven element -->
|
||||
<!-- then we can add advisors to the config and have them picked up by any 'user' role defined autoproxycreators -->
|
||||
|
||||
<object id="loggingAdvisor" type="Spring.Aop.Support.NameMatchMethodPointcutAdvisor, Spring.Aop">
|
||||
<property name="Advice">
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
</property>
|
||||
<property name="MappedNames">
|
||||
<list>
|
||||
<value>12341234asdf*</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAdvisor</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate21.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,149 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{90FEE979-7367-4542-BCCB-BF634E04A9D3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate21.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate21.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate21.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate21\Spring.Data.NHibernate21.2008.csproj">
|
||||
<Project>{E57B4652-0231-49CB-B058-87E10EFE540D}</Project>
|
||||
<Name>Spring.Data.NHibernate21.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2008.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,157 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{90FEE979-7367-4542-BCCB-BF634E04A9D3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate21.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_4_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_4_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Data\NHibernate\DelegatingLocalSessionFactoryObjectTests.cs" />
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate21.Tests.build" />
|
||||
<None Include="Spring.Data.NHibernate21.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2010.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2010.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate21\Spring.Data.NHibernate21.2010.csproj">
|
||||
<Project>{E57B4652-0231-49CB-B058-87E10EFE540D}</Project>
|
||||
<Name>Spring.Data.NHibernate21.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2010.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2010.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2010.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate21.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate21.Tests" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- copy nh libs -->
|
||||
<echo message="NH Libs: ${nh21.lib.dir}" />
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${nh21.lib.dir}">
|
||||
<include name="**/*.dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="../Spring.Data.NHibernate.Tests/**/*.cs" />
|
||||
<include name="../Spring.Data.NHibernate12.Tests/**/*.cs" />
|
||||
<include name="**/*.cs" />
|
||||
<exclude name="../Spring.Data.NHibernate.Tests/Data/NHibernate/SessionFactoryUtilsTests.cs" />
|
||||
<exclude name="AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate20*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate3*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*.Tests.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
|
||||
<call target="common.run-tests" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" />
|
||||
<parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,4 +0,0 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate30 Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate30 assembly")]
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate30.Integration.Tests"
|
||||
table="Credits" lazy="false">
|
||||
<id name="CreditID" column="CreditID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="CreditAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate30.Integration.Tests"
|
||||
table="Debits" lazy="false">
|
||||
<id name="DebitID" column="DebitID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="DebitAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider1"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<db:provider id="DbProvider2"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<object id="SessionFactory1" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider1"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate30.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="SessionFactory2" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider2"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate30.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="transactionManager"
|
||||
type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory1"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory2"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="transactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,119 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa;Password=springqa"/>
|
||||
-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
|
||||
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate30.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="AccountCreditDao" type="Spring.Data.NHibernate.AccountCreditDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
<object id="AccountDebitDao" type="Spring.Data.NHibernate.AccountDebitDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="AuditDao" type="Spring.Data.NHibernate.AuditDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- The DAO object that performs multiple data access operations -->
|
||||
<object id="accountManagerTarget"
|
||||
type="Spring.Data.NHibernate.AccountManager, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="AccountCreditDao" ref="AccountCreditDao"/>
|
||||
<property name="AccountDebitDao" ref="AccountDebitDao"/>
|
||||
|
||||
<!--
|
||||
<property name="AuditDao" ref="AuditDao"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<property name="ThrowException" value="true"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<property name="ThrowExceptionAtEnd" value="true"/>
|
||||
-->
|
||||
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
|
||||
<!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from
|
||||
the session factory. -->
|
||||
<!-- Set the DbProvider explicitly if you would like to have ADO.NET and NHibernate
|
||||
operations take place within the same transaction. -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- construct the transaction proxy based on [Transaction()] in DAO class -->
|
||||
<!-- todo condense this xml for attribute usage for ease of use -->
|
||||
<!--
|
||||
<aop:transaction name=testObjectDao"
|
||||
target="NHTestObjectDao"
|
||||
interfaces="Spring.NHibernate.ITestObjectDao"
|
||||
transactionManager="hibernateTransactionManager"/>
|
||||
-->
|
||||
|
||||
<!-- Transactional Proxy for TestObjectManager using the ProxyFactoryObject -->
|
||||
<object id="accountManager"
|
||||
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
|
||||
|
||||
<property name="Target" ref="accountManagerTarget"/>
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<value>transactionInterceptor</value>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor based on attribute [Transaction()] -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="hibernateTransactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate30.Integration.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
-->
|
||||
|
||||
<object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data">
|
||||
<property name="TargetDbProvider" ref="targetDbProvider"/>
|
||||
<property name="Username" value="User ID=springqa"/>
|
||||
<property name="Password" value="Password=springqa"/>
|
||||
</object>
|
||||
|
||||
<db:provider id="targetDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Database=Spring;Trusted_Connection=False"/>
|
||||
|
||||
|
||||
<db:provider id="standardDbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Database=Spring;Trusted_Connection=False;User ID=springqa;Password=springqa"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<!-- use connection provided by DbProvider
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
-->
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
-->
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,121 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net'
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-1.1"
|
||||
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
<!--
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="OracleODP-2.0"
|
||||
connectionString="Data Source=AGORA; User Id=agora_user; Password=welcome_bad"/>
|
||||
-->
|
||||
<!--
|
||||
<db:provider id="DbProvider"
|
||||
provider="System.Data.SqlClient"
|
||||
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
|
||||
-->
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
<!-- TODO Provide dedicated NHibernate Schema -->
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<!--
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Data.NHibernate.Integration.Tests</value>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<!--
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.Oracle9Dialect"/>
|
||||
-->
|
||||
|
||||
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using transaction attributes -->
|
||||
<object id="testObjectDaoViaTxAttributes"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributeSource">
|
||||
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource" />
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
|
||||
<property name="Target">
|
||||
<object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate30.Integration.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -1,173 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{93FED0CE-0B01-43AF-8CB1-244CC7C3308B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate30.Integration.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LinFu.DynamicProxy, Version=1.0.3.14911, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\LinFu.DynamicProxy.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.2.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.ByteCode.LinFu, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\NHibernate.ByteCode.LinFu.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\AccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\AccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AccountManager.cs">
|
||||
<Link>Data\NHibernate\AccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\AuditDao.cs">
|
||||
<Link>Data\NHibernate\AuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Credit.cs">
|
||||
<Link>Data\NHibernate\Credit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\DbProviderTemplateTests.cs">
|
||||
<Link>Data\NHibernate\DbProviderTemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\Debit.cs">
|
||||
<Link>Data\NHibernate\Debit.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountCreditDao.cs">
|
||||
<Link>Data\NHibernate\IAccountCreditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountDebitDao.cs">
|
||||
<Link>Data\NHibernate\IAccountDebitDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAccountManager.cs">
|
||||
<Link>Data\NHibernate\IAccountManager.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\IAuditDao.cs">
|
||||
<Link>Data\NHibernate\IAuditDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\MultipleDbTests.cs">
|
||||
<Link>Data\NHibernate\MultipleDbTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NativeNHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NativeNHTests.cs">
|
||||
<Link>Data\NHibernate\NativeNHTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHDAOTests.cs">
|
||||
<Link>Data\NHibernate\NHDAOTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TemplateTests.cs">
|
||||
<Link>Data\NHibernate\TemplateTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Spring.Data.NHibernate.Integration.Tests\Data\NHibernate\creditdebit.sql">
|
||||
<Link>Data\NHibernate\creditdebit.sql</Link>
|
||||
</None>
|
||||
<None Include="Spring.Data.NHibernate30.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.2008.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate30.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Credit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Debit.hbm.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\MultipleDbTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\NHDAOTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\templateTests.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate30.Integration.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* current.build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines for C# compiler
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- build Spring.Data.NHibernate30.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="**/*.cs" />
|
||||
<include name="../CommonAssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<lib>
|
||||
<include name="${nh30.lib.dir}"/>
|
||||
</lib>
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="log4net.dll" />
|
||||
<include name="NHibernate.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="${project::get-name()}.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate2*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate31*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate32*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude name="CloverRuntime.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
</target>
|
||||
<target name="test" depends="build">
|
||||
<!-- skipping running of tests for now
|
||||
<nunit2outproc>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll" />
|
||||
</nunit2outproc>
|
||||
-->
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
|
||||
<common>
|
||||
<logging>
|
||||
|
||||
<factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
|
||||
<arg key="level" value="DEBUG" />
|
||||
|
||||
</factoryAdapter>
|
||||
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,5 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate assembly")]
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu" />
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate30.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="hibernateTransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<object name="transactionManager" type="Spring.Transaction.CallCountingTransactionManager, Spring.Data.Tests"/>
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate30.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAroundAdvice</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
<!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
|
||||
<!--
|
||||
<object id="testObjectDaoTransProxy"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="transactionManager"/>
|
||||
<property name="Target" ref="SimpleService"/>
|
||||
|
||||
<property name="ProxyInterfaces" value="Spring.Data.NHibernate.ISimpleService"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<add key="Create*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Update*" value="PROPAGATION_REQUIRED"/>
|
||||
<add key="Find*" value="PROPAGATION_REQUIRED"/>
|
||||
</name-values>
|
||||
</property>
|
||||
</object>
|
||||
-->
|
||||
|
||||
</objects>
|
||||
@@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx"
|
||||
xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=(local);Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa;"/>
|
||||
|
||||
|
||||
|
||||
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
<entry key="proxyfactory.factory_class"
|
||||
value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu" />
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="TestObjectDao" type="Spring.Data.NHibernate.TestObjectDao, Spring.Data.NHibernate30.Tests">
|
||||
<property name="SessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object name="SimpleService" type="Spring.Data.NHibernate.SimpleService, Spring.Data.NHibernate30.Tests">
|
||||
<property name="TestObjectDao" ref="TestObjectDao"/>
|
||||
</object>
|
||||
|
||||
<object name="hibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate, Spring.Data.NHibernate30">
|
||||
<property name="sessionFactory" ref="SessionFactory"/>
|
||||
</object>
|
||||
|
||||
<!-- once add 'internal' role for autoproxycreator that is created via the tx:attribute-driven element -->
|
||||
<!-- then we can add advisors to the config and have them picked up by any 'user' role defined autoproxycreators -->
|
||||
|
||||
<object id="loggingAdvisor" type="Spring.Aop.Support.NameMatchMethodPointcutAdvisor, Spring.Aop">
|
||||
<property name="Advice">
|
||||
<object id="loggingAroundAdvice" type="Spring.Data.LoggingAroundAdvice, Spring.Data.Tests"/>
|
||||
</property>
|
||||
<property name="MappedNames">
|
||||
<list>
|
||||
<value>12341234asdf*</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id ="myAutoProxy" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator">
|
||||
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>loggingAdvisor</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="ProxyTargetType" value="false"/>
|
||||
<property name="ExposeProxy" value="false"/>
|
||||
<property name="Optimize" value="false"/>
|
||||
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>TestObjectDao</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
|
||||
<tx:attribute-driven transaction-manager="transactionManager"/>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.TestObject, Spring.Data.NHibernate30.Tests" table="TestObjects">
|
||||
<id name="ObjectNumber" column="TestObjectNo" type="Int32">
|
||||
<generator class="identity" />
|
||||
|
||||
<!--
|
||||
<generator class="sequence">
|
||||
<param name="sequence">ID_SEQ</param>
|
||||
</generator>
|
||||
-->
|
||||
|
||||
</id>
|
||||
<property name="Age" column="Age" type="Int32"/>
|
||||
<property name="Name" type="String" length="50"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,141 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E4CCB8A2-2381-41D1-B44C-E20E13703056}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate30.Tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.0.4.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate30.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.2008.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate30.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2008.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,148 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E4CCB8A2-2381-41D1-B44C-E20E13703056}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate30.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate30.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_4_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NHibernate30.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_4_0,NH_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=1.0.4.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Config\AopConfiguration.cs">
|
||||
<Link>Data\NHibernate\Config\AopConfiguration.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\HibernateTransactionManagerTests.cs">
|
||||
<Link>Data\NHibernate\HibernateTransactionManagerTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ISimpleService.cs">
|
||||
<Link>Data\NHibernate\ISimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\ITestObjectDao.cs">
|
||||
<Link>Data\NHibernate\ITestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\LocalSessionFactoryObjectTests.cs">
|
||||
<Link>Data\NHibernate\LocalSessionFactoryObjectTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\NHTestObjectDao.cs">
|
||||
<Link>Data\NHibernate\NHTestObjectDao.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\SimpleService.cs">
|
||||
<Link>Data\NHibernate\SimpleService.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeSettingsTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeSettingsTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\Support\SessionScopeTests.cs">
|
||||
<Link>Data\NHibernate\Support\SessionScopeTests.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate30.Tests.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2010.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2010.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.2010.csproj">
|
||||
<Project>{71368632-B8B7-4A6A-8C65-8DA848120C82}</Project>
|
||||
<Name>Spring.Data.NHibernate30.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2010.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2010.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2010</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfiguration.xml" />
|
||||
<EmbeddedResource Include="Data\NHibernate\Config\AopConfigurationTxPointcut.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo "Copying .xml files for tests"
|
||||
xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q /d
|
||||
xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2010\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate30.Tests" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="**/*.cs" />
|
||||
<include name="../CommonAssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<lib>
|
||||
<include name="${nh30.lib.dir}"/>
|
||||
</lib>
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="NHibernate.dll" />
|
||||
<include name="*.dll" />
|
||||
<exclude name="${project::get-name()}.dll" />
|
||||
<exclude name="Spring.Data.NHibernate1*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate2*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate31*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate32*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude name="CloverRuntime.dll" />
|
||||
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
<!-- copy nh libs -->
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${nh.lib.dir}">
|
||||
<include name="**/*.dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
|
||||
<call target="common.run-tests" />
|
||||
</target>
|
||||
<!--
|
||||
<target name="test" depends="build">
|
||||
<nunit2outproc>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll"
|
||||
appconfig="${current.bin.dir}/${project::get-name()}.dll.config" />
|
||||
</nunit2outproc>
|
||||
</target>
|
||||
-->
|
||||
</project>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<!--
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
|
||||
<arg key="configType" value="EXTERNAL" />
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
-->
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" />
|
||||
<parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop" />
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
</configuration>
|
||||
@@ -1,4 +0,0 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate31 Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate31 assembly")]
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate31.Integration.Tests"
|
||||
table="Credits" lazy="false">
|
||||
<id name="CreditID" column="CreditID" type="Int32">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<property name="Amount" column="CreditAmount"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user