|
@@ -123,6 +123,8 @@ public class TestRespondersDisposed : BeforeAfterTestAttribute
|
|
|
public override void After (MethodInfo methodUnderTest)
|
|
|
{
|
|
|
Debug.WriteLine ($"After: {methodUnderTest.Name}");
|
|
|
+ base.After (methodUnderTest);
|
|
|
+
|
|
|
#if DEBUG_IDISPOSABLE
|
|
|
Assert.Empty (Responder.Instances);
|
|
|
#endif
|
|
@@ -131,6 +133,7 @@ public class TestRespondersDisposed : BeforeAfterTestAttribute
|
|
|
public override void Before (MethodInfo methodUnderTest)
|
|
|
{
|
|
|
Debug.WriteLine ($"Before: {methodUnderTest.Name}");
|
|
|
+ base.Before (methodUnderTest);
|
|
|
#if DEBUG_IDISPOSABLE
|
|
|
|
|
|
// Clear out any lingering Responder instances from previous tests
|
|
@@ -140,6 +143,7 @@ public class TestRespondersDisposed : BeforeAfterTestAttribute
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// TODO: Make this inherit from TestRespondersDisposed so that all tests that don't dispose Views correctly can be identified and fixed
|
|
|
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Method)]
|
|
|
public class SetupFakeDriverAttribute : BeforeAfterTestAttribute
|
|
|
{
|
|
@@ -157,6 +161,7 @@ public class SetupFakeDriverAttribute : BeforeAfterTestAttribute
|
|
|
View.Diagnostics = ViewDiagnosticFlags.Off;
|
|
|
|
|
|
Application.Driver = null;
|
|
|
+ base.After (methodUnderTest);
|
|
|
}
|
|
|
|
|
|
public override void Before (MethodInfo methodUnderTest)
|
|
@@ -164,6 +169,7 @@ public class SetupFakeDriverAttribute : BeforeAfterTestAttribute
|
|
|
Debug.WriteLine ($"Before: {methodUnderTest.Name}");
|
|
|
Assert.Null (Application.Driver);
|
|
|
Application.Driver = new FakeDriver { Rows = 25, Cols = 25 };
|
|
|
+ base.Before (methodUnderTest);
|
|
|
}
|
|
|
}
|
|
|
|