Пример #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);
        }
Пример #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);
        }
Пример #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);
        }