Ejemplo n.º 1
0
        public TestHelper GetPades()
        {
            Assert_state(_padesReference);

            _padesReference = new PadesReference(TransformReferenceToCorrectEnvironment(_jobStatusChanged.PadesReference.Url));
            _client.GetPades(_padesReference).ConfigureAwait(false).GetAwaiter().GetResult();

            return(this);
        }
            public void Simple_constructor()
            {
                //Arrange
                var uri            = new Uri("http://localhost/test");
                var padesReference = new PadesReference(uri);

                //Act

                //Assert
                Assert.Equal(uri, padesReference.Url);
            }
Ejemplo n.º 3
0
        public TestHelper ExpectJobStatusForSenderIs(JobStatus expectedStatus, Sender sender = null)
        {
            Assert_state(_jobResponse);

            _jobStatusChanged = GetCurrentReceipt(_jobResponse.JobId, _client, sender);
            Assert.Equal(expectedStatus, _jobStatusChanged.Status);

            if (_jobStatusChanged.Status == NoChanges)
            {
                return(this);
            }

            _confirmationReference = new ConfirmationReference(TransformReferenceToCorrectEnvironment(_jobStatusChanged.ConfirmationReference.Url));

            if (_jobStatusChanged.Status != CompletedSuccessfully)
            {
                return(this);
            }

            _xadesReference = new XadesReference(TransformReferenceToCorrectEnvironment(_jobStatusChanged.Signatures.First().XadesReference.Url));
            _padesReference = new PadesReference(TransformReferenceToCorrectEnvironment(_jobStatusChanged.PadesReference.Url));

            return(this);
        }
Ejemplo n.º 4
0
 public async Task <Stream> GetPades(PadesReference padesReference)
 {
     return(await RequestHelper.GetStream(padesReference.Url).ConfigureAwait(false));
 }
 public JobReferences(Uri confirmation, Uri pades)
 {
     Confirmation = new ConfirmationReference(confirmation);
     Pades        = new PadesReference(pades);
 }