public void CalcTest() { Form1_Accessor target = new Form1_Accessor(); // TODO: 適切な値に初期化してください target.InitializeForm(); target.LeftText.Text = "10"; target.RightText.Text = "10"; target.OperatorComboBox.SelectedItem = Operators.Plus.ToSign(); Assert.AreEqual(20, target.Calc()); target.OperatorComboBox.SelectedItem = Operators.Minus.ToSign(); Assert.AreEqual(0, target.Calc()); target.OperatorComboBox.SelectedItem = Operators.Multiply.ToSign(); Assert.AreEqual(100, target.Calc()); target.OperatorComboBox.SelectedItem = Operators.Divide.ToSign(); Assert.AreEqual(1, target.Calc()); }