Beispiel #1
0
            public void Returns_true_for_correct_certificate()
            {
                //Arrange
                var certificateOrganizationNumber = "984661185";

                //Act
                var isValid = CertificateValidator.IsValidCertificate(CertificateResource.UnitTests.GetPostenCertificate(), certificateOrganizationNumber);

                //Assert
                Assert.True(isValid);
            }
Beispiel #2
0
            public void Returns_false_if_not_issued_to_organization_number()
            {
                //Arrange
                var certificateOrganizationNumber = "123456789";

                //Act
                var isValid = CertificateValidator.IsValidCertificate(CertificateResource.UnitTests.TestIntegrasjonssertifikat(), certificateOrganizationNumber);

                //Assert
                Assert.False(isValid);
            }
Beispiel #3
0
            public void Returns_false_with_null_certificate()
            {
                //Arrange
                const string certificateOrganizationNumber = "123456789";

                //Act
                var isValid = CertificateValidator.IsValidCertificate(null, certificateOrganizationNumber);

                //Assert
                Assert.False(isValid);
            }
Beispiel #4
0
            public void Returns_false_if_not_activated()
            {
                //Arrange
                var certificateOrganizationNumber = "123456789";

                //Act
                var isValid = CertificateValidator.IsValidCertificate(CertificateResource.UnitTests.NotActivatedSelfSignedTestCertificate(), certificateOrganizationNumber);

                //Assert
                Assert.False(isValid);
            }