From 27b6376f6b3d6d3e0867e36e67d7141a984bf017 Mon Sep 17 00:00:00 2001 From: markpollack Date: Tue, 21 Apr 2009 05:51:47 +0000 Subject: [PATCH] misc updates. --- test/Spring/CommonAssemblyInfo.cs | 2 +- .../Expressions/ExpressionEvaluatorTests.cs | 23 +++++++++++++++++++ .../Data/NestedTxScopeTests.cs | 3 +-- .../Data/adoTemplateTests.xml | 2 +- .../Messaging/Listener/SimpleHandler.cs | 8 +++++++ ...sactionalMessageListenerContainerTests.xml | 12 ++++++---- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/test/Spring/CommonAssemblyInfo.cs b/test/Spring/CommonAssemblyInfo.cs index 9833ea63..98fc164a 100644 --- a/test/Spring/CommonAssemblyInfo.cs +++ b/test/Spring/CommonAssemblyInfo.cs @@ -24,7 +24,7 @@ using System.Runtime.CompilerServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.1.0")] +[assembly: AssemblyVersion("1.2.1.0")] // // In order to sign your assembly you must specify a key to use. Refer to the diff --git a/test/Spring/Spring.Core.Tests/Expressions/ExpressionEvaluatorTests.cs b/test/Spring/Spring.Core.Tests/Expressions/ExpressionEvaluatorTests.cs index adfd99ee..c0520841 100644 --- a/test/Spring/Spring.Core.Tests/Expressions/ExpressionEvaluatorTests.cs +++ b/test/Spring/Spring.Core.Tests/Expressions/ExpressionEvaluatorTests.cs @@ -36,6 +36,7 @@ using System.Web.Services; using antlr; using antlr.collections; using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; using Spring.Collections; using Spring.Context; using Spring.Context.Support; @@ -271,6 +272,12 @@ namespace Spring.Expressions #endregion Serialization Tests + [Test] + public void TestMixedAddition() + { + object value = ExpressionEvaluator.GetValue(null, "'123' + 1"); + Console.WriteLine(value); + } [Test(Description="SPRNET-944")] public void DateTests() @@ -279,6 +286,15 @@ namespace Spring.Expressions Assert.AreEqual("date", dateLiteral); } + [Test(Description = "http://jira.springframework.org/browse/SPRNET-1155")] + public void TestDateVariableExpression() + { + Hashtable vars = new Hashtable(); + vars["Date"] = "2008-05-15"; + object value = ExpressionEvaluator.GetValue(null, "#Date", vars); + Assert.That(value, Is.EqualTo("2008-05-15")); + } + [Test] public void ThrowsSyntaxErrorException() { @@ -721,6 +737,13 @@ namespace Spring.Expressions Assert.AreEqual(typeof(System.Collections.Generic.Dictionary), ExpressionEvaluator.GetValue(null, "T(System.Collections.Generic.Dictionary`2[System.String,System.Boolean],mscorlib)")); } + [Test] + public void TestGenericDictionary() + { + ExpressionEvaluator.GetValue(null, + "T(System.Collections.Generic.Dictionary`2[System.String,System.Boolean],mscorlib)"); + } + /// /// Tests type node /// diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/NestedTxScopeTests.cs b/test/Spring/Spring.Data.Integration.Tests/Data/NestedTxScopeTests.cs index 5a583f0b..277318c6 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/NestedTxScopeTests.cs +++ b/test/Spring/Spring.Data.Integration.Tests/Data/NestedTxScopeTests.cs @@ -141,8 +141,6 @@ namespace Spring.Data [Test] public void UnwantedPromotion() { - TransactionOptions transactionoptions = new TransactionOptions(); - transactionoptions.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; using (TransactionScope ts = new TransactionScope()) { InnerMethod(); @@ -154,6 +152,7 @@ namespace Spring.Data private void InnerMethod() { string updateSql2 = "insert into Debits (DebitAmount) VALUES (222)"; + using (SqlConnection cn2005 = new SqlConnection()) { cn2005.ConnectionString = @"Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa; Password=springqa"; diff --git a/test/Spring/Spring.Data.Integration.Tests/Data/adoTemplateTests.xml b/test/Spring/Spring.Data.Integration.Tests/Data/adoTemplateTests.xml index 997d39ac..be0e8039 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Data/adoTemplateTests.xml +++ b/test/Spring/Spring.Data.Integration.Tests/Data/adoTemplateTests.xml @@ -4,7 +4,7 @@ diff --git a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/SimpleHandler.cs b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/SimpleHandler.cs index daa0ea51..22d58661 100644 --- a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/SimpleHandler.cs +++ b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/SimpleHandler.cs @@ -15,6 +15,13 @@ namespace Spring.Messaging.Listener private int messageCount; + private string stateVariable; + + public SimpleHandler(string stateVariable) + { + this.stateVariable = stateVariable; + } + public int MessageCount { @@ -25,6 +32,7 @@ namespace Spring.Messaging.Listener public string HandleMessage(string msgTxt) { LOG.Debug("Received text = [" + msgTxt + "]"); + LOG.Debug("constructor set state string = " + stateVariable); if (msgTxt.Contains("Goodbye")) { throw new ArgumentException("Don't like saying goodbye!"); diff --git a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/TransactionalMessageListenerContainerTests.xml b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/TransactionalMessageListenerContainerTests.xml index 56d1fe27..581bf7b4 100644 --- a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/TransactionalMessageListenerContainerTests.xml +++ b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/TransactionalMessageListenerContainerTests.xml @@ -44,12 +44,12 @@ - + - + @@ -75,14 +75,16 @@ - + - - + + + + \ No newline at end of file