public void VerifyEncryption_NonZeroExitCode_ThrowsGpgException(int exitCode)
        {
            var verifier = new GpgResultVerifier();
            var result   = new GpgResultBuilder()
                           .WithExitCode(exitCode)
                           .Build();

            Should.Throw <GpgException>(() => verifier.VerifyEncryption(result));
        }
        public void VerifyEncryption_ZeroExitCode_DoesNotThrow()
        {
            var verifier = new GpgResultVerifier();
            var result   = new GpgResultBuilder()
                           .WithExitCode(0)
                           .Build();

            Should.NotThrow(() => verifier.VerifyEncryption(result));
        }
        public void VerifyEncryption_InvalidRecipient_ThrowsGpgError()
        {
            var verifier = new GpgResultVerifier();
            var result   = new GpgResultBuilder()
                           .WithStatusMessage(GpgStatusCode.FAILURE)
                           .WithStatusMessage(GpgStatusCode.INV_RECP, "rcp_a rcp_b")
                           .Build();

            Should.Throw <GpgError>(() => verifier.VerifyEncryption(result));
        }
        public void VerifyEncryption_KeyExpired_ThrowsGpgError()
        {
            var verifier = new GpgResultVerifier();
            var result   = new GpgResultBuilder()
                           .WithStatusMessage(GpgStatusCode.FAILURE)
                           .WithStatusMessage(GpgStatusCode.INV_RECP, "rcp_a rcp_b")
                           .WithStatusMessage(GpgStatusCode.KEYEXPIRED)
                           .Build();

            var error = Should.Throw <GpgError>(() => verifier.VerifyEncryption(result));
        }