Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Test/test-data/FullTestProject164.rtd
===================================================================
diff -u -r214922706cd2559757df5b96982bd99cf0fe9cfa -radb7a69497e2221e75420ccf5f5d7407321870dd
Binary files differ
Index: Application/Ringtoets/test/Application.Ringtoets.MigrationConsole.Test/RingtoetsMigrationToolTest.cs
===================================================================
diff -u -rd4f3eeb2e013b9ed46b4a7fd21e3965f25bd763d -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Application/Ringtoets/test/Application.Ringtoets.MigrationConsole.Test/RingtoetsMigrationToolTest.cs (.../RingtoetsMigrationToolTest.cs) (revision d4f3eeb2e013b9ed46b4a7fd21e3965f25bd763d)
+++ Application/Ringtoets/test/Application.Ringtoets.MigrationConsole.Test/RingtoetsMigrationToolTest.cs (.../RingtoetsMigrationToolTest.cs) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -42,12 +42,6 @@
EnvironmentControl.Instance = environmentControl;
}
- [TearDown]
- public void TearDown()
- {
- EnvironmentControl.ResetToDefault();
- }
-
[Test]
public void Main_NoArguments_WritesHelpToConsole()
{
Fisheye: Tag adb7a69497e2221e75420ccf5f5d7407321870dd refers to a dead (removed) revision in file `Migration/Console/src/Migration.Console/DefaultEnvironmentControl.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Migration/Console/src/Migration.Console/EnvironmentControl.cs
===================================================================
diff -u -r56e690b056dd0901609e651f6ac3c010d3d002b7 -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Migration/Console/src/Migration.Console/EnvironmentControl.cs (.../EnvironmentControl.cs) (revision 56e690b056dd0901609e651f6ac3c010d3d002b7)
+++ Migration/Console/src/Migration.Console/EnvironmentControl.cs (.../EnvironmentControl.cs) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -27,7 +27,7 @@
///
/// Controls class for .
///
- public abstract class EnvironmentControl
+ public class EnvironmentControl
{
private static EnvironmentControl instance;
@@ -39,7 +39,7 @@
{
get
{
- return instance ?? (instance = DefaultEnvironmentControl.CurrentInstance);
+ return instance ?? (instance = new EnvironmentControl());
}
set
@@ -58,14 +58,9 @@
///
/// Exit code to be given to the operating system.
/// The caller does not have sufficient security permission to perform this function.
- public abstract void Exit(int exitCode);
-
- ///
- /// Resets the environment to the default.
- ///
- public static void ResetToDefault()
+ public virtual void Exit(int exitCode)
{
- instance = DefaultEnvironmentControl.CurrentInstance;
+ Environment.Exit(exitCode);
}
}
}
\ No newline at end of file
Index: Migration/Console/src/Migration.Console/Migration.Console.csproj
===================================================================
diff -u -r56e690b056dd0901609e651f6ac3c010d3d002b7 -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Migration/Console/src/Migration.Console/Migration.Console.csproj (.../Migration.Console.csproj) (revision 56e690b056dd0901609e651f6ac3c010d3d002b7)
+++ Migration/Console/src/Migration.Console/Migration.Console.csproj (.../Migration.Console.csproj) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -39,7 +39,6 @@
Properties\GlobalAssembly.cs
-
Fisheye: Tag adb7a69497e2221e75420ccf5f5d7407321870dd refers to a dead (removed) revision in file `Migration/Console/test/Migration.Console.Test/DefaultEnvironmentControlTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Migration/Console/test/Migration.Console.Test/EnvironmentControlTest.cs
===================================================================
diff -u -r56e690b056dd0901609e651f6ac3c010d3d002b7 -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Migration/Console/test/Migration.Console.Test/EnvironmentControlTest.cs (.../EnvironmentControlTest.cs) (revision 56e690b056dd0901609e651f6ac3c010d3d002b7)
+++ Migration/Console/test/Migration.Console.Test/EnvironmentControlTest.cs (.../EnvironmentControlTest.cs) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Migration.Console.TestUtil;
using NUnit.Framework;
namespace Migration.Console.Test
@@ -35,7 +34,7 @@
EnvironmentControl instance = EnvironmentControl.Instance;
// Assert
- Assert.IsInstanceOf(instance);
+ Assert.IsInstanceOf(instance);
}
[Test]
@@ -47,34 +46,5 @@
// Assert
Assert.Throws(call);
}
-
- [Test]
- public void ResetToDefault_InstanceReplaced_SetsDefaultInstance()
- {
- // Setup
- EnvironmentControl.Instance = new TestEnvironmentControl();
-
- // Call
- EnvironmentControl.ResetToDefault();
-
- // Assert
- Assert.IsInstanceOf(EnvironmentControl.Instance);
- }
-
- [Test]
- public void Exit_WithErrorCode_SetsDefaultInstance()
- {
- // Setup
- var testEnvironmentControl = new TestEnvironmentControl();
- EnvironmentControl.Instance = testEnvironmentControl;
- const int exitCode = 100;
-
- // Call
- EnvironmentControl.Instance.Exit(exitCode);
-
- // Assert
- int errorCodeCalled = testEnvironmentControl.ErrorCodeCalled;
- Assert.AreEqual(exitCode, errorCodeCalled);
- }
}
}
\ No newline at end of file
Index: Migration/Console/test/Migration.Console.Test/Migration.Console.Test.csproj
===================================================================
diff -u -r56e690b056dd0901609e651f6ac3c010d3d002b7 -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Migration/Console/test/Migration.Console.Test/Migration.Console.Test.csproj (.../Migration.Console.Test.csproj) (revision 56e690b056dd0901609e651f6ac3c010d3d002b7)
+++ Migration/Console/test/Migration.Console.Test/Migration.Console.Test.csproj (.../Migration.Console.Test.csproj) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -47,7 +47,6 @@
Properties\GlobalAssembly.cs
-
Index: Migration/Scripts/test/Migration.Scripts.Data.Test/UpgradeScriptTest.cs
===================================================================
diff -u -r56e690b056dd0901609e651f6ac3c010d3d002b7 -radb7a69497e2221e75420ccf5f5d7407321870dd
--- Migration/Scripts/test/Migration.Scripts.Data.Test/UpgradeScriptTest.cs (.../UpgradeScriptTest.cs) (revision 56e690b056dd0901609e651f6ac3c010d3d002b7)
+++ Migration/Scripts/test/Migration.Scripts.Data.Test/UpgradeScriptTest.cs (.../UpgradeScriptTest.cs) (revision adb7a69497e2221e75420ccf5f5d7407321870dd)
@@ -33,11 +33,8 @@
[TestCase(null)]
public void Constructor_InvalidFromVersion_ThrowsArgumentException(string fromVersion)
{
- // Setup
- const string toVersion = "toVersion";
-
// Call
- TestDelegate call = () => new TestUpgradeScript(fromVersion, toVersion);
+ TestDelegate call = () => new TestUpgradeScript(fromVersion, "toVersion");
// Assert
string paramName = Assert.Throws(call).ParamName;
@@ -49,11 +46,8 @@
[TestCase(null)]
public void Constructor_InvalidToVersion_ThrowsArgumentException(string toVersion)
{
- // Setup
- const string fromVersion = "fromVersion";
-
// Call
- TestDelegate call = () => new TestUpgradeScript(fromVersion, toVersion);
+ TestDelegate call = () => new TestUpgradeScript("fromVersion", toVersion);
// Assert
string paramName = Assert.Throws(call).ParamName;