Пример #1
0
        public IBinderRepository CreateTestBinderRepository()
        {
            IBinderRepository repository = Substitute.For <IBinderRepository>();
            var testBinder = new Binder()
            {
            };

            repository.Get(Arg.Any <string>()).Returns(testBinder);

            return(repository);
        }
Пример #2
0
        public Binder GetOrBuildDirectoryBinderForPath(string fullPath)
        {
            string hash   = GetHashForDirectory(fullPath);
            var    binder = _binderRepository.Get(hash);

            if (binder == null)
            {
                binder          = CreateNew(hash, fullPath, Binder.DirectoryBinderType);
                binder.RackHash = _activeRackServices.ActiveRackHash;
            }
            return(binder);
        }