public void Converts_portal_job_with_polling_queue_successfully() { //Arrange var document = DomainUtility.GetPortalDocument(); var signers = DomainUtility.GetSigners(2); var reference = "reference"; var custompollingqueue = "CustomPollingQueue"; var sender = new Sender(BringPublicOrganizationNumber, new PollingQueue(custompollingqueue)); var source = new Job(document, signers, reference, sender); var expected = new portalsignaturejobrequest { reference = reference, pollingqueue = custompollingqueue }; //Act var result = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, result, out differences); Assert.Empty(differences); }
public async Task Throws_exception_on_no_sender() { //Arrange var clientConfiguration = new ClientConfiguration(Environment.DifiQa, GetPostenTestCertificate()); var portalClient = new PortalClient(clientConfiguration); var portalJob = new Job(DomainUtility.GetPortalDocument(), DomainUtility.GetSigners(1), "SendersReference"); //Act await Assert.ThrowsAsync <SenderNotSpecifiedException>(async() => await portalClient.Create(portalJob).ConfigureAwait(false)).ConfigureAwait(false); }
public void Simple_constructor() { //Arrange var document = DomainUtility.GetPortalDocument(); var signers = DomainUtility.GetSigners(3); var reference = "PortalJobReference"; var portalJob = new Job(document, signers, reference); //Act //Assert Assert.Equal(document, portalJob.Document); Assert.Equal(signers, portalJob.Signers); Assert.Equal(reference, portalJob.Reference); }
public void Simple_constructor() { //Arrange var sender = CoreDomainUtility.GetSender(); var document = DomainUtility.GetPortalDocument(); var signers = DomainUtility.GetSigners(2); //Act var manifest = new Manifest(sender, document, signers); //Assert Assert.Equal(sender, manifest.Sender); Assert.Equal(document, manifest.Document); Assert.Equal(signers, manifest.Signers); }