Пример #1
0
        public void FindAppliesFilter()
        {
            string resourceName = "myscriptfile.js";

            _dirMgr.CreateFile(resourceName, "");
            string filteredResourceName = "filtered.js";

            _dirMgr.CreateFile(filteredResourceName, "");

            _finder = ResourceFinderFactory.GetInstance(_dirMgr.DirectoryName);
            var resources = _finder.FindResources(ResourceType.Script)
                            .Where(r => r.Name != filteredResourceName).ToList();

            Assert.That(resources, Is.Not.Null);
            Assert.That(resources.Count, Is.EqualTo(1));
            Assert.That(resources[0].Name, Is.EqualTo(resourceName));
        }
Пример #2
0
 public void Setup()
 {
     _dirMgr = new TempDirectoryManager();
     _finder = ResourceFinderFactory.GetInstance(_dirMgr.DirectoryName);
 }
Пример #3
0
 public void Init()
 {
     _instance = ResourceFinderFactory.GetInstance(this.GetType().Assembly);
 }