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
This commit is contained in:
@@ -141,6 +141,7 @@ Rebuilding Solutions using Nant and "solutions.build":
|
||||
-->
|
||||
<arg value="${solutionfile}"/>
|
||||
<arg line="/nologo" />
|
||||
<arg line="/verbosity:minimal" />
|
||||
<arg line="/property:Configuration=${solutionconfiguration}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\..\..\build\VS.NET.2008\Spring.Template.Velocity\Debug\Spring.Template.Velocity.xml</DocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -47,6 +48,8 @@
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DocumentationFile>..\..\..\build\VS.NET.2005\Spring.Template.Velocity\Release\Spring.Template.Velocity.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
@@ -69,7 +72,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Template\Velocity\Config\TemplateNamespaceParser.cs" />
|
||||
<Compile Include="Template\Velocity\CommonsLoggingLogSystem.cs" />
|
||||
<Compile Include="Template\Velocity\SpringResourceLoader.cs" />
|
||||
<Compile Include="Template\Velocity\SpringResourceLoader.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityConstants.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineFactory.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineFactoryObject.cs" />
|
||||
|
||||
@@ -31,6 +31,10 @@ namespace Spring.Template.Velocity
|
||||
/// </summary>
|
||||
/// <author>Erez Mazor</author>
|
||||
public class CommonsLoggingLogSystem : ILogSystem {
|
||||
|
||||
/// <summary>
|
||||
/// Shared logger instance.
|
||||
/// </summary>
|
||||
protected static readonly ILog log = LogManager.GetLogger(typeof(CommonsLoggingLogSystem));
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -76,6 +76,9 @@ namespace Spring.Template.Velocity {
|
||||
/// </summary>
|
||||
public const string SPRING_RESOURCE_LOADER_PATH = "spring.resource.loader.path";
|
||||
|
||||
/// <summary>
|
||||
/// Shared logger instance.
|
||||
/// </summary>
|
||||
protected static readonly ILog log = LogManager.GetLogger(typeof(SpringResourceLoader));
|
||||
|
||||
private IResourceLoader resourceLoader;
|
||||
|
||||
@@ -1,12 +1,47 @@
|
||||
namespace Spring.Template.Velocity{
|
||||
/// <summary>
|
||||
/// Common Velocity constants.
|
||||
/// </summary>
|
||||
public class VelocityConstants{
|
||||
|
||||
/// <summary>
|
||||
/// File.
|
||||
/// </summary>
|
||||
public const string File = "file";
|
||||
|
||||
/// <summary>
|
||||
/// Type.
|
||||
/// </summary>
|
||||
public const string Type = "type";
|
||||
|
||||
/// <summary>
|
||||
/// Assembly.
|
||||
/// </summary>
|
||||
public const string Assembly = "assembly";
|
||||
|
||||
/// <summary>
|
||||
/// Class.
|
||||
/// </summary>
|
||||
public const string Class = "class";
|
||||
|
||||
/// <summary>
|
||||
/// Name.
|
||||
/// </summary>
|
||||
public const string Name = "name";
|
||||
|
||||
/// <summary>
|
||||
/// Description.
|
||||
/// </summary>
|
||||
public const string Description = "description";
|
||||
|
||||
/// <summary>
|
||||
/// Path.
|
||||
/// </summary>
|
||||
public const string Path = "path";
|
||||
|
||||
/// <summary>
|
||||
/// Separator.
|
||||
/// </summary>
|
||||
public const string Separator = ".";
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,9 @@ namespace Spring.Template.Velocity {
|
||||
public class VelocityEngineFactory {
|
||||
private const char DELIMITER = ',';
|
||||
|
||||
/// <summary>
|
||||
/// Shared logger instance.
|
||||
/// </summary>
|
||||
protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineFactory));
|
||||
|
||||
private IResource configLocation;
|
||||
@@ -278,6 +281,7 @@ namespace Spring.Template.Velocity {
|
||||
/// <br/>Called by <code>CreateVelocityEngine()</code>.
|
||||
/// </summary>
|
||||
/// <param name="velocityEngine">velocityEngine the VelocityEngine to configure</param>
|
||||
/// <param name="extendedProperties"></param>
|
||||
/// <param name="paths">paths the path list to load Velocity resources from</param>
|
||||
/// <see cref="FileResourceLoader"/>
|
||||
/// <see cref="SpringResourceLoader"/>
|
||||
@@ -326,6 +330,7 @@ namespace Spring.Template.Velocity {
|
||||
/// of the tranditional "ClassFullName, AssemblyName" to work.
|
||||
/// </summary>
|
||||
/// <param name="velocityEngine">velocityEngine the VelocityEngine to configure</param>
|
||||
/// <param name="extendedProperties"></param>
|
||||
/// <param name="resourceLoaderPathString">resourceLoaderPath the path to load Velocity resources from</param>
|
||||
/// <see cref="SpringResourceLoader"/>
|
||||
/// <see cref="InitVelocityResourceLoader"/>
|
||||
|
||||
@@ -32,8 +32,11 @@ namespace Spring.Template.Velocity{
|
||||
/// </summary>
|
||||
/// <author>Erez Mazor</author>
|
||||
public class VelocityEngineUtils {
|
||||
protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineUtils));
|
||||
|
||||
/// <summary>
|
||||
/// Shared logger instance.
|
||||
/// </summary>
|
||||
protected static readonly ILog log = LogManager.GetLogger(typeof(VelocityEngineUtils));
|
||||
|
||||
/// <summary>
|
||||
/// Merge the specified Velocity template with the given model and write
|
||||
|
||||
@@ -21,14 +21,18 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Template.Velocity.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
|
||||
@@ -130,6 +130,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity.Config {
|
||||
Assert.AreEqual("TestDescription", getSingleProperty(velocityEngine, descProp), "incorrect description");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test using local config.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLocalConfig() {
|
||||
VelocityEngine velocityEngine = appContext.GetObject("cnVelocityEngineLocalConfig") as VelocityEngine;
|
||||
|
||||
@@ -164,6 +164,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test engine's logging capabilities.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLogging(){
|
||||
VelocityEngine velocityEngine = new VelocityEngineFactoryObject().CreateVelocityEngine();
|
||||
|
||||
@@ -30,12 +30,29 @@ using Spring.Objects.Factory.Xml;
|
||||
#endregion
|
||||
|
||||
namespace Spring.Template.Velocity.Tests.Template.Velocity {
|
||||
|
||||
/// <summary>
|
||||
/// Base class for Velocity engine tests.
|
||||
/// </summary>
|
||||
public class VelocityEngineTestBase {
|
||||
|
||||
/// <summary>
|
||||
/// Shared application context instance.
|
||||
/// </summary>
|
||||
protected XmlApplicationContext appContext;
|
||||
/// <summary>
|
||||
/// Model used in templating.
|
||||
/// </summary>
|
||||
protected readonly Hashtable model = new Hashtable();
|
||||
/// <summary>
|
||||
/// Simple test value.
|
||||
/// </summary>
|
||||
protected const string TEST_VALUE = "TEST_VALUE";
|
||||
|
||||
#region setup
|
||||
/// <summary>
|
||||
/// Test setup.
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Setup() {
|
||||
appContext = new XmlApplicationContext(false,
|
||||
@@ -47,6 +64,9 @@ namespace Spring.Template.Velocity.Tests.Template.Velocity {
|
||||
#endregion
|
||||
|
||||
#region teardown
|
||||
/// <summary>
|
||||
/// Test cleanup.
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void TearDown() {
|
||||
appContext.Dispose();
|
||||
|
||||
@@ -34,6 +34,9 @@ namespace Spring
|
||||
[TestFixture]
|
||||
public sealed class VelocityCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
/// <summary>
|
||||
/// Setup for entiry test fixture.
|
||||
/// </summary>
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user