diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-02-12 22:04:17 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-02-12 22:04:51 +0400 |
commit | a17744421780b4da5b348a70d9c2540f260335fe (patch) | |
tree | 4c4d6e2653a7a212a9155d0e32e4ce75530ce1a0 /Testing/Tests | |
parent | abe4fb73b1ca5f16c372ea669f6433ef9855821d (diff) |
[WPF] Add new test for TreeView
Diffstat (limited to 'Testing/Tests')
-rw-r--r-- | Testing/Tests/TreeViewTests.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Testing/Tests/TreeViewTests.cs b/Testing/Tests/TreeViewTests.cs index e2fec1ca..cd39b709 100644 --- a/Testing/Tests/TreeViewTests.cs +++ b/Testing/Tests/TreeViewTests.cs @@ -24,6 +24,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; +using NUnit.Framework; namespace Xwt { @@ -33,6 +34,24 @@ namespace Xwt { return new TreeView (); } + + [Test] + public void HiddenTree () + { + var f = new DataField<string> (); + TreeStore ts = new TreeStore (f); + var node = ts.AddNode ().SetValue (f, "1").AddChild ().SetValue (f, "2").AddChild ().SetValue (f, "3"); + var tree = new TreeView (ts); + + Window w = new Window (); + Notebook nb = new Notebook (); + nb.Add (new Label ("Hi"), "One"); + nb.Add (tree, "Two"); + w.Content = nb; + ShowWindow (w); + + tree.ScrollToRow (node.CurrentPosition); + } } } |