Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Maupin <ermaup@microsoft.com>2017-01-13 04:50:50 +0300
committerEric Maupin <ermaup@microsoft.com>2017-01-13 04:50:50 +0300
commitfe3287c786d601d455db7144540b0ff86b6c4ee2 (patch)
tree766c9c9a5bef7061e2540fcd915245b3351935ee /Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs
parent883ba79a2b9e3a277d248ef4602327743d247a52 (diff)
Fix coalesce, get initial grid showing
Diffstat (limited to 'Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs')
-rw-r--r--Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs b/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs
new file mode 100644
index 0000000..38150cb
--- /dev/null
+++ b/Xamarin.PropertyEditing.Tests/PanelViewModelTests.cs
@@ -0,0 +1,36 @@
+using System.Linq;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using Xamarin.PropertyEditing.Reflection;
+using Xamarin.PropertyEditing.ViewModels;
+
+namespace Xamarin.PropertyEditing.Tests
+{
+ [TestFixture]
+ public class PanelViewModelTests
+ {
+ private class TestClass
+ {
+ public string Property
+ {
+ get;
+ set;
+ }
+ }
+
+ [Test]
+ public async Task PropertiesAddedFromEditor ()
+ {
+ var provider = new ReflectionEditorProvider ();
+ var obj = new TestClass();
+ var editor = await provider.GetObjectEditorAsync (obj);
+ Assume.That (editor.Properties.Count, Is.EqualTo (1));
+
+ var vm = new PanelViewModel (provider);
+ vm.SelectedObjects.Add (obj);
+
+ Assert.That (vm.Properties, Is.Not.Empty);
+ Assert.That (vm.Properties[0].Property, Is.EqualTo (editor.Properties.Single()));
+ }
+ }
+} \ No newline at end of file