Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Builders/SoilProfileBuilderExceptionTest.cs =================================================================== diff -u -r49c5da81f49a23dd6e66526d264a08bf510e6963 -rfa3b352bc1b1c01fc73a9a45268c5573807a6381 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Builders/SoilProfileBuilderExceptionTest.cs (.../SoilProfileBuilderExceptionTest.cs) (revision 49c5da81f49a23dd6e66526d264a08bf510e6963) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Builders/SoilProfileBuilderExceptionTest.cs (.../SoilProfileBuilderExceptionTest.cs) (revision fa3b352bc1b1c01fc73a9a45268c5573807a6381) @@ -27,72 +27,6 @@ namespace Ringtoets.Piping.IO.Test.Builders { [TestFixture] - public class SoilProfileBuilderExceptionTest - { - [Test] - public void DefaultConstructor_InnerExceptionNullAndMessageDefault() - { - // Setup - var expectedMessage = string.Format("Exception of type '{0}' was thrown.", - typeof(SoilProfileBuilderException).FullName); - - // Call - var exception = new SoilProfileBuilderException(); - - // Assert - Assert.IsNull(exception.InnerException); - Assert.AreEqual(expectedMessage, exception.Message); - } - - [Test] - public void Constructor_WithCustomMessage_InnerExceptionNullAndMessageSetToCustom() - { - // Setup - var expectedMessage = "Some exception message"; - - // Call - var exception = new SoilProfileBuilderException(expectedMessage); - - // Assert - Assert.IsNull(exception.InnerException); - Assert.AreEqual(expectedMessage, exception.Message); - } - - [Test] - public void Constructor_WithCustomMessageAndInnerException_InnerExceptionSetAndMessageSetToCustom() - { - // Setup - var expectedMessage = "Some exception message"; - var expectedInnerException = new Exception(); - - // Call - var exception = new SoilProfileBuilderException(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 SoilProfileBuilderException("outer", originalInnerException); - - // Precondition - Assert.IsNotNull(originalException.InnerException); - Assert.IsNull(originalException.InnerException.InnerException); - - // Call - SoilProfileBuilderException 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 SoilProfileBuilderExceptionTest : + CustomExceptionDesignGuidelinesTestFixture {} } \ No newline at end of file