Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Exceptions/HydraRingCalculationExceptionTest.cs =================================================================== diff -u -rccda7c4eae626e537cf8497367664bef0095c19f -rfa3b352bc1b1c01fc73a9a45268c5573807a6381 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Exceptions/HydraRingCalculationExceptionTest.cs (.../HydraRingCalculationExceptionTest.cs) (revision ccda7c4eae626e537cf8497367664bef0095c19f) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Exceptions/HydraRingCalculationExceptionTest.cs (.../HydraRingCalculationExceptionTest.cs) (revision fa3b352bc1b1c01fc73a9a45268c5573807a6381) @@ -27,72 +27,6 @@ namespace Ringtoets.HydraRing.Calculation.Test.Exceptions { [TestFixture] - public class HydraRingCalculationExceptionTest - { - [Test] - public void DefaultConstructor_InnerExceptionNullAndMessageDefault() - { - // Setup - string expectedMessage = string.Format("Exception of type '{0}' was thrown.", typeof(HydraRingCalculationException).FullName); - - // Call - HydraRingCalculationException exception = new HydraRingCalculationException(); - - // Assert - Assert.IsInstanceOf(exception); - Assert.IsNull(exception.InnerException); - Assert.AreEqual(expectedMessage, exception.Message); - } - - [Test] - public void Constructor_WithCustomMessage_InnerExceptionNullAndMessageSetToCustom() - { - // Setup - const string expectedMessage = "Some exception message"; - - // Call - HydraRingCalculationException exception = new HydraRingCalculationException(expectedMessage); - - // Assert - Assert.IsNull(exception.InnerException); - Assert.AreEqual(expectedMessage, exception.Message); - } - - [Test] - public void Constructor_WithCustomMessageAndInnerException_InnerExceptionSetAndMessageSetToCustom() - { - // Setup - const string expectedMessage = "Some exception message"; - Exception expectedInnerException = new Exception(); - - // Call - HydraRingCalculationException exception = new HydraRingCalculationException(expectedMessage, expectedInnerException); - - // Assert - Assert.AreSame(expectedInnerException, exception.InnerException); - Assert.AreEqual(expectedMessage, exception.Message); - } - - [Test] - public void Constructor_SerializationRoundTrip_ExceptionProperlyInitialized() - { - // Setup - var originalInnerException = new Exception("inner"); - var originalException = new HydraRingCalculationException("outer", originalInnerException); - - // Precondition - Assert.IsNotNull(originalException.InnerException); - Assert.IsNull(originalException.InnerException.InnerException); - - // Call - HydraRingCalculationException persistedException = SerializationTestHelper.SerializeAndDeserializeException(originalException); - - // Assert - Assert.AreEqual(originalException.Message, persistedException.Message); - Assert.IsNotNull(persistedException.InnerException); - Assert.AreEqual(originalException.InnerException.GetType(), persistedException.InnerException.GetType()); - Assert.AreEqual(originalException.InnerException.Message, persistedException.InnerException.Message); - Assert.IsNull(persistedException.InnerException.InnerException); - } - } + public class HydraRingCalculationExceptionTest : + CustomExceptionDesignGuidelinesTestFixture {} } \ No newline at end of file