From 5bf07f9b8399e34ee7674e8b476158c167c1c489 Mon Sep 17 00:00:00 2001 From: lahma Date: Sun, 29 Nov 2009 21:39:23 +0000 Subject: [PATCH] Fixed Velocity integrations output directory in release build, set treat warnings as errors, added simple documentation for missing members Set MSBuild's output to minimal when doing solution builds to make CI server's build log more tolerable --- build-support/solutions.build.nant | 1 + .../Spring.Template.Velocity.2008.csproj | 5 ++- .../Velocity/CommonsLoggingLogSystem.cs | 4 +++ .../Template/Velocity/SpringResourceLoader.cs | 3 ++ .../Template/Velocity/VelocityConstants.cs | 35 +++++++++++++++++++ .../Velocity/VelocityEngineFactory.cs | 5 +++ .../Template/Velocity/VelocityEngineUtils.cs | 5 ++- .../Spring.Template.Velocity.Tests.csproj | 6 +++- .../Config/TemplateNamespaceParserTests.cs | 3 ++ .../VelocityEngineFactoryObjectTests.cs | 3 ++ .../Velocity/VelocityEngineTestBase.cs | 20 +++++++++++ .../VelocityCompilerOptionsTests.cs | 3 ++ 12 files changed, 90 insertions(+), 3 deletions(-) diff --git a/build-support/solutions.build.nant b/build-support/solutions.build.nant index 58b01bef..fb35f8c5 100644 --- a/build-support/solutions.build.nant +++ b/build-support/solutions.build.nant @@ -141,6 +141,7 @@ Rebuilding Solutions using Nant and "solutions.build": --> + diff --git a/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.2008.csproj b/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.2008.csproj index ffebfb63..a453c1d1 100644 --- a/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.2008.csproj +++ b/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.2008.csproj @@ -39,6 +39,7 @@ prompt 4 ..\..\..\build\VS.NET.2008\Spring.Template.Velocity\Debug\Spring.Template.Velocity.xml + true pdbonly @@ -47,6 +48,8 @@ TRACE;NET_2_0 prompt 4 + true + ..\..\..\build\VS.NET.2005\Spring.Template.Velocity\Release\Spring.Template.Velocity.XML @@ -69,7 +72,7 @@ - + diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs index c235b602..97d20f85 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs @@ -31,6 +31,10 @@ namespace Spring.Template.Velocity /// /// Erez Mazor public class CommonsLoggingLogSystem : ILogSystem { + + /// + /// Shared logger instance. + /// protected static readonly ILog log = LogManager.GetLogger(typeof(CommonsLoggingLogSystem)); /// diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs index 64dbdd0c..fa9ae869 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs @@ -76,6 +76,9 @@ namespace Spring.Template.Velocity { /// public const string SPRING_RESOURCE_LOADER_PATH = "spring.resource.loader.path"; + /// + /// Shared logger instance. + /// protected static readonly ILog log = LogManager.GetLogger(typeof(SpringResourceLoader)); private IResourceLoader resourceLoader; diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityConstants.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityConstants.cs index 09e64d37..93893a87 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityConstants.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityConstants.cs @@ -1,12 +1,47 @@ namespace Spring.Template.Velocity{ + /// + /// Common Velocity constants. + /// public class VelocityConstants{ + + /// + /// File. + /// public const string File = "file"; + + /// + /// Type. + /// public const string Type = "type"; + + /// + /// Assembly. + /// public const string Assembly = "assembly"; + + /// + /// Class. + /// public const string Class = "class"; + + /// + /// Name. + /// public const string Name = "name"; + + /// + /// Description. + /// public const string Description = "description"; + + /// + /// Path. + /// public const string Path = "path"; + + /// + /// Separator. + /// public const string Separator = "."; } } \ No newline at end of file diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs index 1ee39127..4f4f07c2 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs @@ -67,6 +67,9 @@ namespace Spring.Template.Velocity { public class VelocityEngineFactory { private const char DELIMITER = ','; + /// + /// Shared logger instance. + /// protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineFactory)); private IResource configLocation; @@ -278,6 +281,7 @@ namespace Spring.Template.Velocity { ///
Called by CreateVelocityEngine(). /// /// velocityEngine the VelocityEngine to configure + /// /// paths the path list to load Velocity resources from /// /// @@ -326,6 +330,7 @@ namespace Spring.Template.Velocity { /// of the tranditional "ClassFullName, AssemblyName" to work. /// /// velocityEngine the VelocityEngine to configure + /// /// resourceLoaderPath the path to load Velocity resources from /// /// diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs index de2e532b..3c5c9b6b 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs @@ -32,8 +32,11 @@ namespace Spring.Template.Velocity{ /// /// Erez Mazor public class VelocityEngineUtils { - protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineUtils)); + /// + /// Shared logger instance. + /// + protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineUtils)); /// /// Merge the specified Velocity template with the given model and write diff --git a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj index c12b299e..9f2053f0 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj +++ b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj @@ -21,14 +21,18 @@ DEBUG;TRACE prompt 4 + true + + pdbonly true - bin\Release\ + ..\..\..\build\VS.NET.2008\Spring.Template.Velocity.Tests\Release\ TRACE prompt 4 + true diff --git a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/Config/TemplateNamespaceParserTests.cs b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/Config/TemplateNamespaceParserTests.cs index 0452dda6..9a207f66 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/Config/TemplateNamespaceParserTests.cs +++ b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/Config/TemplateNamespaceParserTests.cs @@ -130,6 +130,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity.Config { Assert.AreEqual("TestDescription", getSingleProperty(velocityEngine, descProp), "incorrect description"); } + /// + /// Test using local config. + /// [Test] public void TestLocalConfig() { VelocityEngine velocityEngine = appContext.GetObject("cnVelocityEngineLocalConfig") as VelocityEngine; diff --git a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.cs b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.cs index 447de176..409aacff 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.cs +++ b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.cs @@ -164,6 +164,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity { } } + /// + /// Test engine's logging capabilities. + /// [Test] public void TestLogging(){ VelocityEngine velocityEngine = new VelocityEngineFactoryObject().CreateVelocityEngine(); diff --git a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineTestBase.cs b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineTestBase.cs index 70ebc1b8..6c1cc980 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineTestBase.cs +++ b/test/Spring/Spring.Template.Velocity.Tests/Template/Velocity/VelocityEngineTestBase.cs @@ -30,12 +30,29 @@ using Spring.Objects.Factory.Xml; #endregion namespace Spring.Template.Velocity.Tests.Template.Velocity { + + /// + /// Base class for Velocity engine tests. + /// public class VelocityEngineTestBase { + + /// + /// Shared application context instance. + /// protected XmlApplicationContext appContext; + /// + /// Model used in templating. + /// protected readonly Hashtable model = new Hashtable(); + /// + /// Simple test value. + /// protected const string TEST_VALUE = "TEST_VALUE"; #region setup + /// + /// Test setup. + /// [SetUp] public void Setup() { appContext = new XmlApplicationContext(false, @@ -47,6 +64,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity { #endregion #region teardown + /// + /// Test cleanup. + /// [TearDown] public void TearDown() { appContext.Dispose(); diff --git a/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs b/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs index 1feb6043..0fde333d 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs +++ b/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs @@ -34,6 +34,9 @@ namespace Spring [TestFixture] public sealed class VelocityCompilerOptionTests : CompilerOptionsTests { + /// + /// Setup for entiry test fixture. + /// [TestFixtureSetUp] public void FixtureSetUp() {