/// <summary> /// Initializes the Module to a working state. /// </summary> public void Initialize() { InternalModuleState = ModuleState.Initializing; InternalModuleStatus = ModuleStatusConstants.Initializing; try { InternalInitialize(); if (IsAutoPollingModule) { ModulePollingThread = ThreadUtility.CreateThread(PollingThreadStart); } InternalModuleState = ModuleState.Healthy; InternalModuleStatus = ModuleStatusConstants.Initialized; } catch (Exception ex) { InternalModuleState = ModuleState.Error; InternalModuleStatus = String.Format("{0}\r\n{1}", ModuleStatusConstants.InitializeError, ex.Message); } }
protected override void Because_Of() { _thread = ThreadUtility.CreateThread(testedClass.Poll, "Poll Thread"); }
protected override void Because_Of() { _thread = ThreadUtility.CreateThread(_testedClass.Dispose); }
protected override void Because_Of() { _thread = ThreadUtility.CreateThread(new ThreadStart(_testedClass.Initialize), ""); }
protected override void Because_Of() { Thread = ThreadUtility.CreateThread(TestParameterizedThreadStart, _threadName, false); }
protected override void Because_Of() { Thread = ThreadUtility.CreateThread(TestThreadStart, _threadName); }