diff options
author | Eric Maupin <ermaup@microsoft.com> | 2017-01-17 23:53:36 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2017-01-17 23:53:36 +0300 |
commit | 73741d6cb53a3c45b35d9d83fd7877947a0b424e (patch) | |
tree | 4484cb9cbb1209f5734ada830846ffd290218bcb /Xamarin.PropertyEditing.Tests | |
parent | 3b9660e07c8253ffb95f457bd4389b698c70f9d1 (diff) |
Fix bool test, assume random value not default
Diffstat (limited to 'Xamarin.PropertyEditing.Tests')
-rw-r--r-- | Xamarin.PropertyEditing.Tests/BoolViewModelTests.cs | 2 | ||||
-rw-r--r-- | Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Tests/BoolViewModelTests.cs b/Xamarin.PropertyEditing.Tests/BoolViewModelTests.cs index fac7716..9a56ed7 100644 --- a/Xamarin.PropertyEditing.Tests/BoolViewModelTests.cs +++ b/Xamarin.PropertyEditing.Tests/BoolViewModelTests.cs @@ -9,7 +9,7 @@ namespace Xamarin.PropertyEditing.Tests { protected override bool GetRandomTestValue (Random rand) { - return (rand.Next (0, 1) == 1); + return true; // Because we often need to look for change notices, we can't use the default value of the type } protected override PropertyViewModel<bool> GetViewModel (IPropertyInfo property, IEnumerable<IObjectEditor> editors) diff --git a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs index 3a47cbe..67e2e83 100644 --- a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs +++ b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs @@ -116,6 +116,7 @@ namespace Xamarin.PropertyEditing.Tests public async Task UnsubscribedValueChanged () { TValue testValue = GetRandomTestValue (); + Assume.That (testValue, Is.Not.EqualTo (default(TValue))); var obj = new TestClass (); Assume.That (obj.Property, Is.EqualTo (default (TValue))); |