diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-04-27 23:41:36 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-05-01 00:54:20 +0300 |
commit | ce0b16d6b4ed11bf89c054a0fba1f6b81e5de441 (patch) | |
tree | 39814cf504623589c7c9e08c27e1747280530c04 /Xamarin.PropertyEditing.Tests | |
parent | 6733b45455489e7f23988e2a1a58a36710a4b957 (diff) |
[Core] Add category AutoExpand
Diffstat (limited to 'Xamarin.PropertyEditing.Tests')
-rw-r--r-- | Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs b/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs index f7a1e74..1525c35 100644 --- a/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs +++ b/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs @@ -643,6 +643,24 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (() => vm.SelectedObjects.Add (target), Throws.Nothing); } + [Test] + public async Task AutoExpand () + { + var provider = new ReflectionEditorProvider (); + var obj = new TestClassSub (); + var editor = await provider.GetObjectEditorAsync (obj); + Assume.That (editor.Properties.Count, Is.EqualTo (2)); + + var vm = new PanelViewModel (new TargetPlatform (provider)) { + ArrangeMode = PropertyArrangeMode.Category, + AutoExpand = true + }; + vm.SelectedObjects.Add (obj); + + Assume.That (vm.ArrangedEditors, Is.Not.Empty); + Assert.That (vm.GetIsExpanded (vm.ArrangedEditors[0].Key), Is.True); + } + internal override PanelViewModel CreateVm (IEditorProvider provider) { return new PanelViewModel (new TargetPlatform (provider)); |