2 // HScrollPropertiesTest.cs
\r
4 // Permission is hereby granted, free of charge, to any person obtaining
\r
5 // a copy of this software and associated documentation files (the
\r
6 // "Software"), to deal in the Software without restriction, including
\r
7 // without limitation the rights to use, copy, modify, merge, publish,
\r
8 // distribute, sublicense, and/or sell copies of the Software, and to
\r
9 // permit persons to whom the Software is furnished to do so, subject to
\r
10 // the following conditions:
\r
12 // The above copyright notice and this permission notice shall be
\r
13 // included in all copies or substantial portions of the Software.
\r
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 // Copyright (c) 2007 Jonathan Pobst
\r
26 // Jonathan Pobst (monkey@jpobst.com)
\r
31 using NUnit.Framework;
\r
32 using System.Drawing;
\r
33 using System.Windows.Forms;
\r
35 namespace MonoTests.System.Windows.Forms
\r
38 public class HScrollPropertiesTests : TestHelper
\r
41 public void Constructor ()
\r
43 ScrollableControl sc = new ScrollableControl ();
\r
44 ScrollProperties sp = sc.HorizontalScroll;
\r
46 Assert.AreEqual (true, sp.Enabled, "A1");
\r
47 Assert.AreEqual (10, sp.LargeChange, "A2");
\r
48 Assert.AreEqual (100, sp.Maximum, "A3");
\r
49 Assert.AreEqual (0, sp.Minimum, "A4");
\r
50 Assert.AreEqual (1, sp.SmallChange, "A5");
\r
51 Assert.AreEqual (0, sp.Value, "A6");
\r
52 Assert.AreEqual (false, sp.Visible, "A7");
\r
56 public void PropertyEnabled ()
\r
58 ScrollableControl sc = new ScrollableControl ();
\r
59 ScrollProperties sp = sc.HorizontalScroll;
\r
62 Assert.AreEqual (false, sp.Enabled, "B1");
\r
66 public void PropertyLargeChange ()
\r
68 ScrollableControl sc = new ScrollableControl ();
\r
69 ScrollProperties sp = sc.HorizontalScroll;
\r
71 sp.LargeChange = 25;
\r
72 Assert.AreEqual (25, sp.LargeChange, "B1");
\r
76 public void PropertyMaximum ()
\r
78 ScrollableControl sc = new ScrollableControl ();
\r
79 ScrollProperties sp = sc.HorizontalScroll;
\r
82 Assert.AreEqual (200, sp.Maximum, "B1");
\r
86 public void PropertyMinimum ()
\r
88 ScrollableControl sc = new ScrollableControl ();
\r
89 ScrollProperties sp = sc.HorizontalScroll;
\r
92 Assert.AreEqual (20, sp.Minimum, "B1");
\r
96 public void PropertySmallChange ()
\r
98 ScrollableControl sc = new ScrollableControl ();
\r
99 ScrollProperties sp = sc.HorizontalScroll;
\r
101 sp.SmallChange = 5;
\r
102 Assert.AreEqual (5, sp.SmallChange, "B1");
\r
106 public void PropertyValue ()
\r
108 ScrollableControl sc = new ScrollableControl ();
\r
109 ScrollProperties sp = sc.HorizontalScroll;
\r
112 Assert.AreEqual (10, sp.Value, "B1");
\r
116 public void PropertyVisible ()
\r
118 ScrollableControl sc = new ScrollableControl ();
\r
119 ScrollProperties sp = sc.HorizontalScroll;
\r
122 Assert.AreEqual (true, sp.Visible, "B1");
\r