예제 #1
0
        public void TestBuildMessageBox01()
        {
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            messageBoxAccessor.SetField("m_icon", SystemIcons.Error);
            messageBoxForm.BuildButtons(MessageBoxButtons.OKCancel);
            messageBoxForm.BuildMessageBox("SampleMessageBox", "Hi!!", 2, true);
        }
예제 #2
0
        public void TestBuildMessageBox05()
        {
            //Test --- long display name
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            messageBoxForm.BuildButtons(MessageBoxButtons.OK);
            messageBoxForm.BuildMessageBox("Sample Test", "long display test 21ebufe873487bnvufr7y843ythg878738294019240ujf9ery8gt93853845tjrgf98y9358123-18024019u030jf89r8948597yrhf89734589349cdlotrhig89595viufr8yvhbasijodiq29384923850nver789t3459760894309jvniofugh948956865089234cvm90c57-27u8rtu8345ytnog8y35t05y8u1-8-431nc4r8051-8mctyhwerhg875078-51-yjcn589mc8694jcxcm7yy7huahfrr89thunncuhiqy89014804178-517yuhjw8o7y9025870257uhifvrwohbv789057180808080808080808080808080808080808080808080gh8r7fghhhhhhhhhhhhhhhhhhhhhhhhhhwotyr895872222222000000000hv8eghb8787", 1, false);
        }
예제 #3
0
        public void TestBuildMessageBox04()
        {
            //Test exception thrown
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            messageBoxForm.BuildButtons(MessageBoxButtons.OK);
            messageBoxForm.BuildMessageBox("SampleMessageBox", "Hi!!", 1, false);
        }
예제 #4
0
        public void TestBuildMessageBox03()
        {
            //Test 1 button and no icons
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            messageBoxForm.BuildButtons(MessageBoxButtons.OK);
            messageBoxForm.BuildMessageBox("SampleMessageBox", "Hi!!", 1, false);
        }
예제 #5
0
        public void TestBuildMessageBox02()
        {
            //test - 3 buttons
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            messageBoxAccessor.SetField("m_icon", SystemIcons.Error);
            messageBoxForm.BuildButtons(MessageBoxButtons.AbortRetryIgnore);
            messageBoxForm.BuildMessageBox("SampleMessageBox", "Hi!!", 3, true);
        }
예제 #6
0
        public void TestBuildButtons07()
        {
            MessageBoxForm messageBoxForm     = new MessageBoxForm();
            Accessor       messageBoxAccessor = ReflectionAccessor.Wrap(messageBoxForm);

            //Test Procedure Call
            messageBoxForm.BuildButtons((MessageBoxButtons)44);
            //Post Condition Check
            Assert.IsNull(messageBoxAccessor.GetField("m_button1"));
            Assert.IsNull(messageBoxAccessor.GetField("m_button2"));
            Assert.IsNull(messageBoxAccessor.GetField("m_button3"));
        }