summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs')
-rw-r--r--Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs b/Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs
new file mode 100644
index 00000000..e34f9a4a
--- /dev/null
+++ b/Xamarin.Forms.Core.UnitTests/ContraintTypeConverterTests.cs
@@ -0,0 +1,16 @@
+using NUnit.Framework;
+
+namespace Xamarin.Forms.Core.UnitTests
+{
+ [TestFixture]
+ public class ContraintTypeConverterTests : BaseTestFixture
+ {
+ [Test]
+ public void ConvertFrom ()
+ {
+ var converter = new ConstraintTypeConverter ();
+ Assert.AreEqual (Constraint.Constant (1.0).Compute (null), ((Constraint)converter.ConvertFromInvariantString ("1.0")).Compute (null));
+ Assert.AreEqual (Constraint.Constant (1.3).Compute (null), ((Constraint)converter.ConvertFromInvariantString ("1.3")).Compute (null));
+ }
+ }
+} \ No newline at end of file