Provides automatic detection of entry point Candidates.
Exemple #1
0
        public void TestListCandidates()
        {
            Deploy(DotNetExeTest.Reference, xbit: false);
            Deploy(PythonScriptTest.Reference, xbit: true);
            Deploy(PosixScriptTest.Reference, xbit: true);
            Deploy(PosixBinaryTest.Reference32, xbit: true);

            var candidates = Detection.ListCandidates(Directory).ToList();

            candidates.Should().BeEquivalentTo(
                DotNetExeTest.Reference,
                PythonScriptTest.Reference,
                PosixScriptTest.Reference,
                PosixBinaryTest.Reference32);
        }
        public void TestListCandidates()
        {
            Deploy(DotNetExeTest.Reference, xbit: false);
            Deploy(WindowsExeTest.Reference32, xbit: false);
            Deploy(PythonScriptTest.Reference, xbit: true);
            Deploy(PosixScriptTest.Reference, xbit: true);
            Deploy(PosixBinaryTest.Reference32, xbit: true);

            var candidates = Detection.ListCandidates(Directory).ToList();

            CollectionAssert.AreEquivalent(
                new Candidate[]
            {
                DotNetExeTest.Reference,
                WindowsExeTest.Reference32,
                PythonScriptTest.Reference,
                PosixScriptTest.Reference,
                PosixBinaryTest.Reference32
            },
                candidates);
        }
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Assert.IsEmpty(Detection.ListCandidates(Directory).ToList());
 }
Exemple #4
0
 [Fact] // Should not fail on empty files
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Detection.ListCandidates(Directory).Should().BeEmpty();
 }