summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs')
-rw-r--r--Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs b/Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs
new file mode 100644
index 00000000..e6d97d24
--- /dev/null
+++ b/Xamarin.Forms.Core.UnitTests/BindingTypeConverterTests.cs
@@ -0,0 +1,27 @@
+´╗┐using NUnit.Framework;
+
+namespace Xamarin.Forms.Core.UnitTests
+{
+ [TestFixture]
+ public class BindingTypeConverterTests : BaseTestFixture
+ {
+ [Test]
+ public void CanConvertFrom()
+ {
+ var c = new BindingTypeConverter();
+ Assert.That (c.CanConvertFrom (typeof (string)), Is.True);
+ Assert.That (c.CanConvertFrom (typeof (int)), Is.False);
+ }
+
+ [Test]
+ public void Convert()
+ {
+ var c = new BindingTypeConverter();
+ var binding = c.ConvertFromInvariantString ("Path");
+
+ Assert.That (binding, Is.InstanceOf<Binding>());
+ Assert.That (((Binding) binding).Path, Is.EqualTo ("Path"));
+ Assert.That (((Binding) binding).Mode, Is.EqualTo (BindingMode.Default));
+ }
+ }
+} \ No newline at end of file