Beispiel #1
0
 public void TestTextManipulationWithMnemonicNoEllipsing(TestCase testCase)
 {
     DecentGroupBoxWrapper gb = new DecentGroupBoxWrapper { Width = testCase.Width, UseMnemonic = true, AutoEllipsis = false};
     gb.Text = testCase.Text;
     Assert.IsFalse(gb.AutoEllipsis, "auto ellipse setting");
     Assert.IsTrue(gb.UseMnemonic, "use mnemonic setting");
     Assert.That(gb.Text, Is.EqualTo(testCase.Text), "Raw text TestCase: " + testCase.Text);
     Assert.That(gb.ManipulatedText, Is.EqualTo(testCase.Expected), "Manipulated text TestCase: " + testCase.Text);
 }
Beispiel #2
0
        public void TestTextManipulationNoMnemonicNoAutoEllipse(TestCase testCase)
        {
            DecentGroupBoxWrapper gb = new DecentGroupBoxWrapper {
                Width = testCase.Width, UseMnemonic = false, AutoEllipsis = false
            };

            gb.Text = testCase.Text;
            Assert.IsFalse(gb.AutoEllipsis, "auto ellipse setting");
            Assert.IsFalse(gb.UseMnemonic, "use mnemonic setting");
            Assert.That(gb.Text, Is.EqualTo(testCase.Text), "Raw text TestCase: " + testCase.Text);
            Assert.That(gb.ManipulatedText, Is.EqualTo(testCase.Expected), "Manipulated text TestCase: " + testCase.Text);
        }
Beispiel #3
0
        public void TextBoxWidthNearFudgeFactor([Values(10, 14, 15, 16, 18)] int width)
        {
            const string          text = "SomeTextOrOther";
            DecentGroupBoxWrapper gb   = new DecentGroupBoxWrapper {
                Width = width
            };

            gb.Text = text;
            Assert.IsTrue(gb.AutoEllipsis, "auto ellipse setting");
            Assert.IsFalse(gb.UseMnemonic, "use mnemonic setting");
            Assert.That(gb.Text, Is.EqualTo(text), "Raw text TestCase width: " + width);
            Assert.That(gb.ManipulatedText, Is.EqualTo(String.Empty), "Manipulated text TestCase width: " + width);
        }
 public void TextBoxWidthNearFudgeFactor([Values(10, 14, 15, 16, 18)] int width)
 {
     const string text = "SomeTextOrOther";
     DecentGroupBoxWrapper gb = new DecentGroupBoxWrapper { Width = width };
     gb.Text = text;
     Assert.IsTrue(gb.AutoEllipsis, "auto ellipse setting");
     Assert.IsFalse(gb.UseMnemonic, "use mnemonic setting");
     Assert.That(gb.Text, Is.EqualTo(text), "Raw text TestCase width: " + width);
     Assert.That(gb.ManipulatedText, Is.EqualTo(String.Empty), "Manipulated text TestCase width: " + width);
 }