Esempio n. 1
0
        public void IsDebugTrueの時のToReg出力(CtrlType ctrlType, bool isDebug, String str, String expected)
        {
            //setUp
            OneVal sut = Assistance.CreateOneVal(ctrlType, str);
            //exercise
            String actual = sut.ToReg(isDebug);

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 2
0
        [TestCase(CtrlType.ComboBox, "2", false)]        //不正入力 list.size()オーバー
        public void FromRegの不正パラメータ判定(CtrlType ctrlType, String str, bool expected)
        {
            //setUp
            var sut = Assistance.CreateOneVal(ctrlType, null);
            //exercise
            var actual = sut.FromReg(str);

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 3
0
        public void デフォルト値をtoRegで取り出す(CtrlType ctrlType, Object val, String expected)
        {
            //setUp
            const bool isSecret = false;
            var        sut      = Assistance.CreateOneVal(ctrlType, val);
            //exercise
            var actual = sut.ToReg(isSecret);

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 4
0
        public void FromRegで設定した値をtoRegで取り出す(CtrlType ctrlType, String str)
        {
            //setUp
            const bool isSecret = false;
            OneVal     sut      = Assistance.CreateOneVal(ctrlType, null);

            sut.FromReg(str);
            var expected = str;
            //exercise
            String actual = sut.ToReg(isSecret);

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 5
0
        public void ReadCtrlFalseでデフォルトの値に戻るかどうかのテスト(CtrlType ctrlType, Object value)
        {
            //setUp
            var sut      = Assistance.CreateOneVal(ctrlType, value);
            var tabindex = 0;

            sut.CreateCtrl(null, 0, 0, ref tabindex);
            var b = sut.ReadCtrl(false); //isConfirm = false; 確認のみではなく、実際に読み込む

            Assert.IsTrue(b);            // readCtrl()の戻り値がfalseの場合、読み込みに失敗している
            var expected = value;
            //exercise
            var actual = sut.Value;

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }