예제 #1
0
        public LogFileModule(IDbContext dbContext
                             , IAppSettings appSettings
                             , ICreateLogFileCommand createLogFileCommand
                             , IDeleteLogFileCommand deleteLogFileCommand
                             , IDirectoryWrap dirWrap
                             )
        {
            _dbContext            = dbContext;
            _appSettings          = appSettings;
            _createLogFileCommand = createLogFileCommand;
            _deleteLogFileCommand = deleteLogFileCommand;
            _dirWrap = dirWrap;

            Post[Actions.LogFile.Delete()] = x =>
            {
                this.RequiresClaims(new[] { Claims.ProjectEdit });
                return(DeleteLogFile(x.logFileId));
            };

            Post[Actions.LogFile.Save()] = x =>
            {
                this.RequiresClaims(new[] { Claims.ProjectEdit });
                return(Save());
            };
        }
        public void UserStoreTest_SetUp()
        {
            _fileWrap         = Substitute.For <IFileWrap>();
            _dirWrap          = Substitute.For <IDirectoryWrap>();
            _passwordProvider = Substitute.For <IPasswordProvider>();

            _userStore = new UserStore(_path, _fileWrap, _dirWrap, _passwordProvider);
        }
 public void LogFileModuleTest_SetUp()
 {
     _dbContext            = Substitute.For <IDbContext>();
     _appSettings          = Substitute.For <IAppSettings>();
     _createLogFileCommand = Substitute.For <ICreateLogFileCommand>();
     _deleteLogFileCommand = Substitute.For <IDeleteLogFileCommand>();
     _dirWrap = Substitute.For <IDirectoryWrap>();
 }
예제 #4
0
 public UserStore(string filePath, IFileWrap fileWrap, IDirectoryWrap dirWrap, IPasswordProvider passwordProvider)
 {
     this.FilePath     = filePath;
     _fileWrap         = fileWrap;
     _dirWrap          = dirWrap;
     _passwordProvider = passwordProvider;
     this.Users        = new List <UserModel>();
     this.Connections  = new List <ConnectionModel>();
 }
        public FileSystemContainerManager(string rootPath, IDirectoryWrap directory)
        {
            _rootPath = rootPath;
              _directoryWrapper = directory;

              if (!_directoryWrapper.Exists(rootPath)) {
            _directoryWrapper.CreateDirectory(rootPath);
              }
        }
예제 #6
0
 public void StartTest()
 {
     _directoryWrap     = new DirectoryWrap();
     _directoryInfoWrap = _directoryWrap.CreateDirectory(path);
     Assert.IsTrue(_directoryInfoWrap.Exists, "Directory TempTest must be created.");
 }
예제 #7
0
 public void StartTest()
 {
     _directoryWrap = new DirectoryWrap();
     _directoryInfoWrap = _directoryWrap.CreateDirectory(path);
     Assert.IsTrue(_directoryInfoWrap.Exists, "Directory TempTest must be created.");
 }