From 05741eb2b27e318b9a64d271f6834e01aa312db0 Mon Sep 17 00:00:00 2001 From: "E.Z. Hart" Date: Mon, 27 Nov 2017 17:48:42 -0700 Subject: [PATCH] [Tests] make sure the test pass even if the locale is wrongly implemented on the platform (#1292) --- Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs b/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs index dd5a38107..dc9726ee1 100644 --- a/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs +++ b/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs @@ -173,10 +173,7 @@ namespace Xamarin.Forms.Core.UnitTests var bo = new MockBindable { BindingContext = vm }; bo.SetBinding(property, binding); - if (System.Threading.Thread.CurrentThread.CurrentCulture.Name == "tr-TR") - Assert.That(bo.GetValue(property), Is.EqualTo("%95,00")); - else - Assert.That(bo.GetValue(property), Is.EqualTo("95.00 %")); + Assert.That(bo.GetValue(property), Is.EqualTo(string.Format(new System.Globalization.CultureInfo(culture),"{0:P2}",.95d))); //%95,00 or 95.00% } [Test]