diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectDao.cs b/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectDao.cs index bd87ad93..1a0dd91b 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectDao.cs +++ b/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectDao.cs @@ -40,14 +40,14 @@ namespace Spring.Data.Generic { return AdoTemplate.QueryWithRowMapper(CommandType.Text, "select TestObjectNo, Age, Name from TestObjects", - new TestObjectRowMapper()); + new TestObjectRowMapper()); } public TestObject FindOne() { return AdoTemplate.QueryForObject(CommandType.Text, "", - new TestObjectRowMapper()); + new TestObjectRowMapper()); } } } diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectRowMapper.cs b/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectRowMapper.cs index db94ce88..bc497e51 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectRowMapper.cs +++ b/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectRowMapper.cs @@ -34,12 +34,12 @@ namespace Spring.Data.Generic /// /// /// Mark Pollack - public class TestObjectRowMapper : IRowMapper where T : TestObject, new() + public class TestObjectRowMapper : IRowMapper { - public T MapRow(IDataReader reader, int rowNum) + public TestObject MapRow(IDataReader reader, int rowNum) { - if (reader == null) return new T(); - T to = new T(); + if (reader == null) return new TestObject(); + TestObject to = new TestObject(); to.ObjectNumber = reader.GetInt32(0); to.Age = reader.GetInt32(1); to.Name = reader.GetString(2); diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/MappingVacationQuery.cs b/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/MappingVacationQuery.cs new file mode 100644 index 00000000..1bce64da --- /dev/null +++ b/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/MappingVacationQuery.cs @@ -0,0 +1,17 @@ + + +using System.Data; +#if NET_2_0 || NET_3_0 +namespace Spring.Data.Objects.Generic +{ + public class MappingVacationQuery : MappingAdoQuery + { + protected override T MapRow(IDataReader reader, int num) + { + throw new System.NotImplementedException(); + } + + private VacationRowMapper vacationRowMapper = new VacationRowMapper(); + } +} +#endif \ No newline at end of file diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/StoredProcedureTests.cs b/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/StoredProcedureTests.cs index dd3e6f17..dae261e6 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/StoredProcedureTests.cs +++ b/test/Spring/Spring.Data.Integration.Tests/Data/Objects/Generic/StoredProcedureTests.cs @@ -52,7 +52,7 @@ namespace Spring.Data.Objects.Generic [Test] public void TestReflection() { - IRowMapper rm = new TestObjectRowMapper(); + IRowMapper rm = new TestObjectRowMapper(); NamedResultSetProcessor rsp = new NamedResultSetProcessor("Test", rm); @@ -145,7 +145,7 @@ namespace Spring.Data.Objects.Generic : base(dbProvider, "SelectTestObjectAndVacations") { DeriveParameters(); - AddRowMapper("testObjectRowMapper", new TestObjectRowMapper()); + AddRowMapper("testObjectRowMapper", new TestObjectRowMapper()); AddRowMapper("vacationRowMapper", new VacationRowMapper()); Compile(); } @@ -163,7 +163,7 @@ namespace Spring.Data.Objects.Generic : base(dbProvider, "SelectByName") { DeriveParameters(); - AddRowMapper("testObjectRowMapper", new TestObjectRowMapper() ); + AddRowMapper("testObjectRowMapper", new TestObjectRowMapper() ); Compile(); } diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/TransactionTemplateTests.cs b/test/Spring/Spring.Data.Integration.Tests/Data/TransactionTemplateTests.cs index fa0d6ae4..877de0cf 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/TransactionTemplateTests.cs +++ b/test/Spring/Spring.Data.Integration.Tests/Data/TransactionTemplateTests.cs @@ -153,6 +153,10 @@ namespace Spring.Data public void ExecuteTemplate() { TransactionTemplate tt = new TransactionTemplate(transactionManager); + tt.Execute(delegate(ITransactionStatus status) + { + return null; + }); object result = tt.Execute(new SimpleTransactionCallback(dbProvider)); Assert.AreEqual(2, (int)result); diff --git a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2005.csproj b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2005.csproj index 4d0ea3f4..70f4d245 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2005.csproj +++ b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2005.csproj @@ -127,6 +127,7 @@ +