diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-11-03 17:22:00 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-11-04 08:12:52 -0800 |
commit | 462e19abd9034c11a12cad30e9899740f2bef8ff (patch) | |
tree | e08667f1d69249f8daa6c348a919bd0fd5434415 /src/DotNetOpenAuth.Test/TestBase.cs | |
parent | 6a79be0eca3929d8fb4e797799dac8d6f7875475 (diff) | |
download | DotNetOpenAuth-462e19abd9034c11a12cad30e9899740f2bef8ff.zip DotNetOpenAuth-462e19abd9034c11a12cad30e9899740f2bef8ff.tar.gz DotNetOpenAuth-462e19abd9034c11a12cad30e9899740f2bef8ff.tar.bz2 |
Changed namepace and project names in preparation for merge with DotNetOpenId.
Diffstat (limited to 'src/DotNetOpenAuth.Test/TestBase.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/TestBase.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/TestBase.cs b/src/DotNetOpenAuth.Test/TestBase.cs new file mode 100644 index 0000000..9ec0858 --- /dev/null +++ b/src/DotNetOpenAuth.Test/TestBase.cs @@ -0,0 +1,45 @@ +//----------------------------------------------------------------------- +// <copyright file="TestBase.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.Test { + using System.Reflection; + using DotNetOpenAuth.OAuth.Messages; + using log4net; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + /// <summary> + /// The base class that all test classes inherit from. + /// </summary> + public class TestBase { + /// <summary> + /// The logger that tests should use. + /// </summary> + internal static readonly ILog TestLogger = LogManager.GetLogger("DotNetOpenAuth.Test"); + + /// <summary> + /// Gets or sets the test context which provides + /// information about and functionality for the current test run. + /// </summary> + public TestContext TestContext { get; set; } + + /// <summary> + /// The TestInitialize method for the test cases. + /// </summary> + [TestInitialize] + public virtual void SetUp() { + log4net.Config.XmlConfigurator.Configure(Assembly.GetExecutingAssembly().GetManifestResourceStream("DotNetOpenAuth.Test.Logging.config")); + MessageBase.LowSecurityMode = true; + } + + /// <summary> + /// The TestCleanup method for the test cases. + /// </summary> + [TestCleanup] + public virtual void Cleanup() { + log4net.LogManager.Shutdown(); + } + } +} |