public IBinderRepository CreateTestBinderRepository() { IBinderRepository repository = Substitute.For <IBinderRepository>(); var testBinder = new Binder() { }; repository.Get(Arg.Any <string>()).Returns(testBinder); return(repository); }
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); }