public void ModesController_TryGetPanelInfo_False() { // Arrange var panel = new PanelTest(); var modesController = new ModesController(); // Act var actual = modesController.TryGetPanelInfo(panel, out _); // Assert Assert.IsFalse(actual); }
public void ModesController_TryGetPanelInfo_True() { // Arrange var panel = new PanelTest(); var modesController = new ModesController(); // Act modesController.Add(panel, Modes.None); var actual = modesController.TryGetPanelInfo(panel, out _); // Assert Assert.IsTrue(actual); }
public void ModesController_TryGetPanelInfo_Panel() { // Arrange var expected = new PanelTest(); var modesController = new ModesController(); // Act modesController.Add(expected, Modes.None); modesController.TryGetPanelInfo(expected, out var panelInfo); var actual = panelInfo.Panel; // Assert Assert.AreEqual(expected, actual); }
public void ModesController_TryGetPanelInfo_Mode() { // Arrange const Modes expected = Modes.None; var panel = new PanelTest(); var modesController = new ModesController(); // Act modesController.Add(panel, expected); modesController.TryGetPanelInfo(panel, out var panelInfo); var actual = panelInfo.Mode; // Assert Assert.AreEqual(expected, actual); }
public void Composer_Constructor_GetPanel() { // Arrange const string name = "test"; var expected = new PanelTest(name); var panels = new List <IPanel> { expected }; var modesController = new ModesController(); // Act var composer = new Composer(panels, modesController); var actual = composer.GetPanel(name); // Assert Assert.AreEqual(expected, actual); }
public void CommandOpenPanelModal_Constructor_Exception2() { // Arrange var actual = false; var panel = new PanelTest(); // Act try { var unused = new CommandOpenPanelModal(panel, null); } catch (ArgumentNullException) { actual = true; } // Assert Assert.IsTrue(actual); }
private void SelectOtherTest(ItemCheckedEventArgs e) { OtherTestNameEnum tname = (OtherTestNameEnum)e.Item.Tag; if (e.Item.Checked) { _panel.PanelTests.Add(new PanelTest() { OtherTestName = tname.ToString(), Panel = _panel }); } else { PanelTest pt = _panel.GetOtherPanelTest(tname); if (pt != null) { _panel.PanelTests.Remove(pt); } } }
private void lbtAddTest_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmSelectTest frm = new FrmSelectTest(_panel); frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { foreach (Test t in frm._selectedTest) { PanelTest pt = new PanelTest(); pt.TestId = t; pt.Panel = _panel; _panel.PanelPanelTests.Add(pt); if (!SymptomDirectedTestAdded(t)) { PSymptomDirectedTest pSDT = new PSymptomDirectedTest(); pSDT.Test = t; pSDT.PediatricInTreatmeant = 0; pSDT.PediatricPreART = 0; pSDT.Protocol = _panel.Protocol; pSDT.AdultInTreatmeant = 0; pSDT.AdultPreART = 0; _panel.Protocol.SymptomDirectedTests.Add(pSDT); } } PopPanelTests(); //if (OnDataUsageEdit != null) //{ // OnDataUsageEdit(this, new EventArgs()); //} } }
public void Deny_Unrestricted() { PanelTest unit = new PanelTest(); unit.NoWrap(); }