Skip to content

Commit

Permalink
Add untitlity test
Browse files Browse the repository at this point in the history
  • Loading branch information
saintentropy committed Dec 12, 2019
1 parent 182399a commit 2fcd3b5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using DynamoUtilities;
using NUnit.Framework;

namespace DynamoUtilitiesTests
{
class CertificateVerificationTests
{
[Test]
[Category("UnitTests")]
public void CheckAssemblyForValidCertificateTest()
{
var executingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var directory = new DirectoryInfo(executingDirectory);
var testFilePath = Path.Combine(directory.Parent.Parent.Parent.FullName, "test", "pkgs_signed", "Signed Package", "bin", "Package.dll");

Assert.IsTrue(File.Exists(testFilePath));

Assert.IsTrue(DynamoUtilities.CertificateVerification.CheckAssemblyForValidCertificate(testFilePath));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<Compile Include="..\..\..\src\AssemblySharedInfoGenerator\AssemblySharedInfo.cs">
<Link>AssemblySharedInfo.cs</Link>
</Compile>
<Compile Include="CertificateVerificationTests.cs" />
<Compile Include="DataMarshalerTests.cs" />
<Compile Include="ProductLookUpTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down

0 comments on commit 2fcd3b5

Please sign in to comment.