public void Decodes_configuration() { PlmConfiguration test; test = new PlmConfiguration(Constants.CONFIG_DISABLE_AUTO_LINKING); Assert.IsTrue(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_MONITOR_MODE); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsTrue(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_MANUAL_LED_CONTROL); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsTrue(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_DISABLE_RS232_DEADMAN); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsTrue(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_DISABLE_AUTO_LINKING | Constants.CONFIG_DISABLE_RS232_DEADMAN); Assert.IsTrue(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsTrue(test.Rs232Deadman); }
public void Decodes_configuration() { PlmConfiguration test; test = new PlmConfiguration(Constants.CONFIG_DISABLE_AUTO_LINKING); Assert.IsTrue(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_MONITOR_MODE); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsTrue(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_MANUAL_LED_CONTROL); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsTrue(test.ManualLedControl); Assert.IsFalse(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_DISABLE_RS232_DEADMAN); Assert.IsFalse(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsTrue(test.Rs232Deadman); test = new PlmConfiguration(Constants.CONFIG_DISABLE_AUTO_LINKING | Constants.CONFIG_DISABLE_RS232_DEADMAN); Assert.IsTrue(test.AutoLinkingDisabled); Assert.IsFalse(test.MonitorMode); Assert.IsFalse(test.ManualLedControl); Assert.IsTrue(test.Rs232Deadman); }