Exemple #1
0
        public void ErrorProvider_GetIconAlignment_InvokeWithoutError_ReturnsMiddleRight()
        {
            var provider = new ErrorProvider();
            var control  = new Control();

            Assert.Equal(ErrorIconAlignment.MiddleRight, provider.GetIconAlignment(control));

            // Call again.
            Assert.Equal(ErrorIconAlignment.MiddleRight, provider.GetIconAlignment(control));
        }
Exemple #2
0
        public void ErrorProvider_SetIconAlignment_Invoke_GetIconAlignmentReturnsExpected(ErrorIconAlignment value)
        {
            var provider = new ErrorProvider();
            var control  = new Control();

            provider.SetIconAlignment(control, value);
            Assert.Equal(value, provider.GetIconAlignment(control));

            // Call again.
            provider.SetIconAlignment(control, value);
            Assert.Equal(value, provider.GetIconAlignment(control));
        }
Exemple #3
0
        public void GetandSetIconAlignmentTest()
        {
            TextBox       myTextBox       = new TextBox();
            ErrorProvider myErrorProvider = new ErrorProvider();

            myErrorProvider.SetIconAlignment(myTextBox, ErrorIconAlignment.MiddleRight);
            Assert.AreEqual(ErrorIconAlignment.MiddleRight, myErrorProvider.GetIconAlignment(myTextBox), "#getset2");
        }
Exemple #4
0
        public void ErrorProvider_GetIconAlignment_NullControl_ThrowsArgumentNullException()
        {
            var provider = new ErrorProvider();

            Assert.Throws <ArgumentNullException>("control", () => provider.GetIconAlignment(null));
        }