예제 #1
0
        public TestHelper Sign_job()
        {
            var signer = _job.Signers.First();

            if (signer.Identifier is ContactInformation)
            {
                throw new Exception("Unable to sign a contact identified by contact information, because this is not implemented.");
            }

            var httpResponseMessage = _client.AutoSign((int)_jobResponse.JobId, ((PersonalIdentificationNumber)signer.Identifier).Value).Result;

            Assert.True(httpResponseMessage.IsSuccessStatusCode, "Signing through API failed. Are you trying to sign a job type " +
                        "that we do not offer API signing for? Remember that this is not " +
                        "possible in production!");

            return(this);
        }