summaryrefslogtreecommitdiffstats
path: root/src/YOURLIBNAME.Test/TestBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/YOURLIBNAME.Test/TestBase.cs')
-rw-r--r--src/YOURLIBNAME.Test/TestBase.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/YOURLIBNAME.Test/TestBase.cs b/src/YOURLIBNAME.Test/TestBase.cs
new file mode 100644
index 0000000..3c9788f
--- /dev/null
+++ b/src/YOURLIBNAME.Test/TestBase.cs
@@ -0,0 +1,25 @@
+using System.Reflection;
+using log4net;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace YOURLIBNAME.Test {
+ public class TestBase {
+ internal readonly static ILog Logger = LogManager.GetLogger("YOURLIBNAME.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; }
+
+ [TestInitialize]
+ public virtual void SetUp() {
+ log4net.Config.XmlConfigurator.Configure(Assembly.GetExecutingAssembly().GetManifestResourceStream("YOURLIBNAME.Test.Logging.config"));
+ }
+
+ [TestCleanup]
+ public virtual void Cleanup() {
+ log4net.LogManager.Shutdown();
+ }
+ }
+}