ListCandidates() публичный статический Метод

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.
Результат List
Пример #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);
        }
Пример #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);
        }
Пример #3
0
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Assert.IsEmpty(Detection.ListCandidates(Directory).ToList());
 }
Пример #4
0
 [Fact] // Should not fail on empty files
 public void TestEmpty()
 {
     FileUtils.Touch(Path.Combine(Directory.FullName, "empty"));
     Detection.ListCandidates(Directory).Should().BeEmpty();
 }