//-- Properties #endregion //--------------------------------------------------------------------- #region Constructors /// <summary> /// Initializes a new instance of the FhemObjectsRepository class. /// </summary> /// <param name="a_fhemClient"> /// The Fhem client for keeping the repository up to date. /// </param> /// <remarks> /// The constructor is private to force the usage of the static /// 'Create' method (long lasting operations do not belong into a /// constructor ;). /// </remarks> public FhemObjectsRepository(FhemClient a_fhemClient) { //-- Initialize fields m_fhemClient = a_fhemClient; //-- Start the update timer with a very small interval to force an //-- immediate update. After elapsing, the timer will be configured //-- anew for standard use m_updateTimer = new Timer(20); m_updateTimer.AutoReset = false; //-- The starter event handler should be called only once m_updateTimer.Elapsed += m_updateTimer_Elapsed_StarterHandler; m_updateTimer.Start(); }
public void FhemClient_SendNativeCommand_FhemClientNotConnectedTest() { var fhemClient = new FhemClient(); fhemClient.SendNativeCommand("jsonlist2"); }
public void FhemClient_RenameFhemObject_FhemObjectArgumentEmptyTest() { var fhemClient = new FhemClient(null, null); fhemClient.RenameFhemObject(null, "Palim"); }
public void FhemClient_RenameFhemObject_FhemClientNotConnectedTest() { var fhemClient = new FhemClient(); fhemClient.RenameFhemObject(null, "Palim"); }
public void FhemClient_GetFhemObjects_FhemClientNotConnectedTest() { var fhemClient = new FhemClient(); fhemClient.GetFhemObjects(); }