//----------------------------------------------------------------------- // // Copyright (c) Andrew Arnott. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Test { using System.IO; using System.Reflection; using DotNetOpenAuth.OAuth.Messages; using log4net; using Microsoft.VisualStudio.TestTools.UnitTesting; /// /// The base class that all test classes inherit from. /// public class TestBase { /// /// The full path to the directory that contains the test ASP.NET site. /// internal static readonly string TestWebDirectory = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..\..\src\DotNetOpenAuth.TestWeb")); /// /// Gets or sets the test context which provides /// information about and functionality for the current test run. /// public TestContext TestContext { get; set; } /// /// Gets the logger that tests should use. /// internal static ILog TestLogger { get { return TestUtilities.TestLogger; } } /// /// The TestInitialize method for the test cases. /// [TestInitialize] public virtual void SetUp() { log4net.Config.XmlConfigurator.Configure(Assembly.GetExecutingAssembly().GetManifestResourceStream("DotNetOpenAuth.Test.Logging.config")); MessageBase.LowSecurityMode = true; } /// /// The TestCleanup method for the test cases. /// [TestCleanup] public virtual void Cleanup() { log4net.LogManager.Shutdown(); } } }