public static void Initialize(TestContext context) { var debugLocation = Assembly.GetExecutingAssembly().Location; var debugFolder = Path.GetDirectoryName(debugLocation); var testFolder = Path.Combine(debugFolder, "testData"); var files = Directory.GetFiles(testFolder); InMemoryRoomRepository.initInstance(roomList); courseList = SheetParser.Parse(files, InMemoryRoomRepository.getInstance()); firstCourseRecord = courseList.First(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); // TODO: remove this. For testing only. Clear repositories InMemoryUserRepository.GetInstance().ConnectedUsers.ToList().Clear(); InMemoryUserRepository.GetInstance().WaitingList.ToList().Clear(); InMemoryRoomRepository.GetInstance().Rooms.ToList().Clear(); var physicsTimer = new System.Timers.Timer(15); physicsTimer.Enabled = true; // Hook up the Elapsed event for the timer. physicsTimer.Elapsed += new ElapsedEventHandler(Engine.OnPhysicsTimedEvent); var updateTimer = new Timer(45); updateTimer.Enabled = true; updateTimer.Elapsed += new ElapsedEventHandler(Engine.OnUpdateClientsTimedEvent); }
public HomeController() { this._userRepository = InMemoryUserRepository.GetInstance(); this._roomRepository = InMemoryRoomRepository.GetInstance(); }
public PongRHub() { _userRepository = InMemoryUserRepository.GetInstance(); _roomRepository = InMemoryRoomRepository.GetInstance(); }
public RoomProvider(IMemoryCache cache, InMemoryRoomRepository repository) { _cache = cache; _repository = repository; }