Exemplo n.º 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 LogFileModuleTest_SetUp()
 {
     _dbContext            = Substitute.For <IDbContext>();
     _appSettings          = Substitute.For <IAppSettings>();
     _createLogFileCommand = Substitute.For <ICreateLogFileCommand>();
     _deleteLogFileCommand = Substitute.For <IDeleteLogFileCommand>();
     _dirWrap = Substitute.For <IDirectoryWrap>();
 }
Exemplo n.º 3
0
        public void DeleteLogFileCommandTest_SetUp()
        {
            _dbContext = Substitute.For <IDbContext>();

            _deleteLogFileCommand = new DeleteLogFileCommand(_dbContext);
        }