diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs index f87f930..d20eed8 100644 --- a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs +++ b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs @@ -284,10 +284,11 @@ namespace Xamarin.PropertyEditing.Tests var resource = new Resource ("name"); var vm = GetViewModel (mockProperty.Object, new[] { GetBasicEditor (mockProperty.Object) }); - Assume.That (vm.ResourceProvider, Is.Null); + Assert.That (vm.SetValueResourceCommand.CanExecute (resource), Is.False); } + /* [Test] public void CanSetValueToResource () { @@ -332,6 +333,7 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (vm.SetValueResourceCommand.CanExecute (resource), Is.False, "Could set value to readonly resource"); } + [Test] public void CanRequestResource() { @@ -374,7 +376,7 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (setChanged, Is.True); Assert.That (vm.SetValueResourceCommand.CanExecute (resource), Is.True); } - + */ [Test] public void CanRequestResourceNoProvider() { @@ -391,7 +393,7 @@ namespace Xamarin.PropertyEditing.Tests var vm = GetViewModel (mockProperty.Object, new[] { editor }); Assert.That (vm.RequestResourceCommand.CanExecute (null), Is.False); } - + /* [Test] [Description ("RequestResourceCommand's CanExecuteChanged should fire when SetValueResourceCommand's does")] public void CanRequestResourceSetValueChanges() @@ -419,7 +421,7 @@ namespace Xamarin.PropertyEditing.Tests Assume.That (setChanged, Is.True); Assert.That (requestChanged, Is.True); } - + [Test] public void SetValueToResource () { @@ -509,7 +511,7 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (vm.ValueSource, Is.EqualTo (ValueSource.Local)); Assert.That (changed, Is.True, "CanExecuteChanged didn't fire"); // Converitng to local should make the command unexecutable because its now already local } - +*/ [Test] public async Task ConvertToLocalValueAlreadyLocal () { @@ -1051,7 +1053,7 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (changed, Is.True, "CanExecuteChanged did not fire"); Assert.That (vm.NavigateToValueSourceCommand.CanExecute (null), Is.True, "Navigate not enabled once value source became valid"); } - + /* [Test] public void CanCreateResource () { @@ -1153,7 +1155,7 @@ namespace Xamarin.PropertyEditing.Tests vm.RequestCreateResourceCommand.Execute (null); Assert.That (requested, Is.True, "CreateResourceRequested did not fire"); } - +*/ protected TViewModel GetViewModel (IPropertyInfo property, IObjectEditor editor) { return GetViewModel (property, new[] { editor }); |