private void btnInject_Click(object sender, EventArgs e) { Inject inj = new Inject(); var result = inj.ShowDialog(); if (result == DialogResult.OK) { StateAfterInjection state = new StateAfterInjection(); switch (inj.SelectedColor) { case InjectColor.Black: state = iterator.Current().InjectBlack(); break; case InjectColor.Red: state = iterator.Current().InjectRed(); break; case InjectColor.White: state = iterator.Current().InjectWhite(); break; } Output("Реакция: " + state.StateDescription); if (state.Death) { Log(iterator.Current().GetName() + "[id:" + iterator.Current().ID.ToString() + "] погибает."); ta.RemoveVolunteer(iterator.Index); } } UpdateIterator(); }
public void CreateAfricanAndInjectHimBlack() { Human vl = new Human(100, "Аглы", "Матумба", 45, Race.African); StateAfterInjection sai = vl.InjectBlack(); Assert.AreEqual(sai.StateDescription, "Нет реакции"); Assert.AreEqual(sai.Death, false); }