コード例 #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);
 }