public void InnerExceptionSet()
        {
            var innerException = new Exception();
            var exception = new InitializeModuleException("msg", innerException);

            Assert.That(exception.InnerException, Is.SameAs(innerException));
        }
        public void InnerExceptionSet()
        {
            var innerException = new Exception();
            var exception      = new InitializeModuleException("msg", innerException);

            Assert.Same(innerException, exception.InnerException);
        }
        public void IsSerializable()
        {
            var exception = new InitializeModuleException();

            try
            {
                using (var stream = new MemoryStream())
                {
                    var formatter = new BinaryFormatter();
                    formatter.Serialize(stream, exception);

                    stream.Position = 0;

                    exception = (InitializeModuleException)formatter.Deserialize(stream);
                }
            }
            catch (Exception)
            {
                Assert.Fail("Type must be serializable.");
            }

            Assert.That(exception, Is.Not.Null, "Type could not be deserialized.");
        }
        public void IsTypeOfException()
        {
            var exception = new InitializeModuleException();

            Assert.That(exception, Is.AssignableTo<Exception>(), "Type is not an exception.");
        }
        public void HasMessage()
        {
            var exception = new InitializeModuleException("msg");

            Assert.That(exception.Message, Is.EqualTo("msg"));
        }
        public void IsTypeOfException()
        {
            var exception = new InitializeModuleException();

            Assert.IsAssignableFrom <Exception>(exception);
        }
        public void HasMessage()
        {
            var exception = new InitializeModuleException("msg");

            Assert.Equal("msg", exception.Message);
        }