Ejemplo n.º 1
0
        public void CertificateManager_RemoveCertificiate_Invalid()
        {
            // Assemble
            byte[]             cert    = File.ReadAllBytes("invalid.txt");
            CertificateManager manager = new CertificateManager();

            // Action
            ResponseType result = manager.RemoveCertificate(cert);

            // Assert
            result.Should().Be(ResponseType.InvalidCertificate);
        }
Ejemplo n.º 2
0
        public void CertificateManager_RemoveCertificiate_NotPresent()
        {
            // Assemble
            byte[]             cert    = File.ReadAllBytes("test.cer");
            CertificateManager manager = new CertificateManager();

            manager.RemoveCertificate(cert);//If its already there

            // Action
            ResponseType result = manager.RemoveCertificate(cert);

            // Assert
            result.Should().Be(ResponseType.NotPresent);
        }
Ejemplo n.º 3
0
        public void CertificateManager_RemoveCertificiate_Success()
        {
            // Assemble
            byte[]             cert    = File.ReadAllBytes("test.cer");
            CertificateManager manager = new CertificateManager();

            manager.AddCertificate(cert);//Make sure its there already

            // Action
            ResponseType result = manager.RemoveCertificate(cert);

            // Assert
            result.Should().Be(ResponseType.Success);
        }