private void ISCSiStatus() { try { bool isPer = ISCSiAPI.IsPersistentConnetionType(); bool isConnected = ISCSiAPI.IsIscsiConneted(); bool isDiskAlready = ISCSiAPI.DisksAlready(); if (!isPer) { MessageBox.Show("ISCSi not persistent."); } if (!isConnected) { MessageBox.Show("ISCSi not connected."); } if (!isDiskAlready) { MessageBox.Show("ISCSi not online."); } ChangeStatus(CheckModule.ISCSiConnection, isPer && isConnected && isDiskAlready); } catch (Exception ex) { logger.Debug(ex.ToString()); MessageBox.Show("Iscsi Error:" + ex.Message); } }
public void IsIscsiConnetedTest() { bool expected = true; // TODO: 初始化為適當值 bool actual; actual = ISCSiAPI.IsIscsiConneted(); Assert.AreEqual(expected, actual); }