public void Constructor_WithoutArguments_Exception()
        {
            // Arrange & Act
            var exception = new EventIsNotRegisteredException();

            // Assert
            Assert.NotEmpty(exception.Message);
            Assert.Null(exception.InnerException);
        }
        public void Constructor_Message_Exception()
        {
            // Arrange
            var message = Guid.NewGuid().ToString();

            // Act
            var exception = new EventIsNotRegisteredException(message);

            // Assert
            Assert.Equal(message, exception.Message);
            Assert.Null(exception.InnerException);
        }
        public void Constructor_InnerException_Exception()
        {
            // Arrange
            var message        = Guid.NewGuid().ToString();
            var innerException = new InvalidOperationException("The operation is invalid");

            // Act
            var exception = new EventIsNotRegisteredException(message, innerException);

            // Assert
            Assert.Equal(innerException, exception.InnerException);
            Assert.Equal(message, exception.Message);
            Assert.NotNull(exception.InnerException);
        }
        public void Constructor_Serealization_Exception()
        {
            // Arrange
            var message        = Guid.NewGuid().ToString();
            var innerException = new InvalidOperationException("The operation is invalid");

            // Act
            var exception = new EventIsNotRegisteredException(message, innerException);
            var bytes     = SerializeToBytes(exception);
            var result    = DeserializeFromBytes <EventIsNotRegisteredException>(bytes);

            // Assert
            Assert.True(bytes.Length > 0);
            Assert.NotNull(result.Message);
            Assert.NotNull(result.InnerException);
            Assert.Equal(innerException, exception.InnerException);
            Assert.Equal(message, exception.Message);
        }