Beispiel #1
0
        public void PermissionDenied()
        {
            bool wasSuccessful = false;

            try
            {
                TestClientGeneralErrors.PermissionDenied(apiKey);
            }
            catch (ZeroSSLErrorException ex)
            {
                wasSuccessful = (ex.Code == "2800" && ex.Type == "incorrect_request_type");
            }

            Assert.IsTrue(wasSuccessful);
        }
Beispiel #2
0
        public void InvalidApiFunction()
        {
            bool wasSuccessful = false;

            try
            {
                TestClientGeneralErrors.InvalidAPIFunction(apiKey);
            }
            catch (ZeroSSLErrorException ex)
            {
                wasSuccessful = (ex.Code == "103" && ex.Type == "invalid_api_function" && ex.Info == "This API Function does not exist.");
            }

            Assert.IsTrue(wasSuccessful);
        }
Beispiel #3
0
        public void MissingAccessKey()
        {
            bool wasSuccessful = false;

            try
            {
                TestClientGeneralErrors.MissingAPIKey();
            }
            catch (EmptyAPIKeyException ex)
            {
                wasSuccessful = true;
            }

            Assert.IsTrue(wasSuccessful);
        }
Beispiel #4
0
        public void InvalidAccessKey()
        {
            bool wasSuccessful = false;

            try
            {
                TestClientGeneralErrors.InvalidAPIKey();
            }
            catch (ZeroSSLErrorException ex)
            {
                wasSuccessful = (ex.Code == "101" && ex.Type == "invalid_access_key" && ex.Info == "You have not supplied a valid API Access Key. [Technical Support: [email protected]]");
            }

            Assert.IsTrue(wasSuccessful);
        }
Beispiel #5
0
        public void CertificateNotFound()
        {
            bool wasSuccessful = false;

            try
            {
                TestClientGeneralErrors.CertificateNotFound(apiKey);
            }
            catch (ZeroSSLErrorException ex)
            {
                wasSuccessful = (ex.Code == "2803" && ex.Type == "certificate_not_found" && ex.Info == null);
            }

            Assert.IsTrue(wasSuccessful);
        }