Esempio n. 1
0
        public void ContinuousLettersMatch_Should_RankHigher()
        {
            var query    = "asd";
            var projects = @"AppleSauceDriver,AsdSomething".Split(',')
                           .Select(x => new ProjectDirectory($@"D:\code\lib\{x}", x, "c", "c#"))
                           .OrderBy(x => x.RootDirectoryName);

            var results   = ProjectCrawler.RankedMatch(projects, query);
            var topResult = results.FirstOrDefault();

            Assert.AreEqual(topResult.Project.Name, "AsdSomething");
        }
Esempio n. 2
0
 public async Task <List <ProjectMatchResult> > SearchAsync(string searchTerm) => ProjectCrawler.RankedMatch(_projectDirectories, searchTerm).ToList();