ListCandidates() public static method

Returns a list of entry point Candidates in a directory.
public static ListCandidates ( DirectoryInfo baseDirectory ) : List
baseDirectory System.IO.DirectoryInfo The base directory to scan for entry points.
return List
Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Assert.IsEmpty(Detection.ListCandidates(Directory).ToList());
 }
Ejemplo n.º 4
0
 [Fact] // Should not fail on empty files
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Detection.ListCandidates(Directory).Should().BeEmpty();
 }