public GameServerManagerRefac(IGameFileManagerProvider fileProvider, IBackgroundService backgroundService, ILoggerFactory logFactory, IServerProcessManagerProvider procManager, IRepository repository) { _fileProvider = fileProvider; _logFactory = logFactory; _logger = logFactory.CreateLogger <GameServerManagerRefac>(); _backgroundService = backgroundService; _repository = repository; _procManager = procManager.GetProcessManagerProvider(); }
public GameFileManagerProviderShould() { var logger = new LoggerFactory(); var mockDirectoryProvider = new Mock <IDefaultDirectoryProvider>(); mockDirectoryProvider .Setup(dp => dp.GetGameFileDirectory()) .Returns("C:\\Server Files"); var mockSteamCredProvider = new Mock <ISteamCredentialProvider>(); var mockMediator = new Mock <IMediator>(); IGameFileManager localFileManager = new LocalGameFileManager(logger, mockDirectoryProvider.Object, mockMediator.Object); IGameFileManager steamFileManager = new SteamCmdGameFiles(mockSteamCredProvider.Object, logger, mockDirectoryProvider.Object, mockMediator.Object); fileManagers = new List <IGameFileManager>(); fileManagers.Add(localFileManager); fileManagers.Add(steamFileManager); fileProvider = new GameFileManagerProvider(logger, fileManagers); }