Skip to content

Commit

Permalink
Merge pull request #401 from digipost/description-for-job
Browse files Browse the repository at this point in the history
Adds possibility to describe direct signature job
  • Loading branch information
Simen Støa authored Oct 5, 2022
2 parents f5aa695 + 46cb766 commit 5ce1a9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="CompareNETObjects" Version="4.77.0" />
<PackageReference Include="CompareNETObjects" Version="4.78.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
Expand Down
8 changes: 6 additions & 2 deletions Digipost.Signature.Api.Client.Direct.Tests/JobTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ public void Simple_constructor()
var documents = DomainUtility.GetSingleDirectDocument();
var exitUrls = DomainUtility.GetExitUrls();
var sender = CoreDomainUtility.GetSender();

var description = "Description";
//Act
var directJob = new Job("Job title", documents, signers, id, exitUrls, sender);
var directJob = new Job("Job title", documents, signers, id, exitUrls, sender)
{
Description = description
};

//Assert
Assert.Equal(id, directJob.Reference);
Assert.Equal(signers, directJob.Signers);
Assert.Equal(documents, directJob.Documents);
Assert.Equal(exitUrls, directJob.ExitUrls);
Assert.Equal(sender, directJob.Sender);
Assert.Equal(description, directJob.Description);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public static DocumentBundle CreateAsice(Job job, X509Certificate2 certificate,
var manifest = new Manifest(job.Title, job.Sender, job.Documents, job.Signers)
{
AuthenticationLevel = job.AuthenticationLevel,
IdentifierInSignedDocuments = job.IdentifierInSignedDocuments
IdentifierInSignedDocuments = job.IdentifierInSignedDocuments,
Description = job.Description
};
var signature = new SignatureGenerator(certificate, job.Documents, manifest);

Expand Down
2 changes: 1 addition & 1 deletion Digipost.Signature.Api.Client.Direct/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Job(string title, IEnumerable<Document> documents, IEnumerable<Signer> si

public string Title { get; }

public string Description { get; }
public string Description { get; set; }

public IEnumerable<Document> Documents { get; }

Expand Down

0 comments on commit 5ce1a9c

Please sign in to comment.