示例#1
0
        public void correct_root_is_assigned_to_found_files()
        {
            Func <string, string> pathFor = root => TestSource.Paths().Single(p => p.EndsWith(root));

            _scanResult.Where(s => s.RootPath == pathFor("Templates")).ShouldHaveCount(37);
            _scanResult.Where(s => s.RootPath == pathFor("Pak1")).ShouldHaveCount(8);
            _scanResult.Where(s => s.RootPath == pathFor("Pak2")).ShouldHaveCount(4);
        }
示例#2
0
        protected override void beforeEach()
        {
            Services.Inject <IFileSystem>(new FileSystem());
            _scanResult = new List <ITemplate>();
            var request = new ScanRequest();

            request.AddRoots(TestSource.Paths());
            request.IncludeSparkViews();
            request.AddHandler(file => _scanResult.Add(new Template(file.Path, file.Root, "")));

            ClassUnderTest.Scan(request);
        }