From 4a8c0201921b8dfc1537332991260d9a2c518eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Herceg?= Date: Sun, 22 Oct 2023 10:49:14 +0200 Subject: [PATCH] Fixed unit tests --- src/Tests/Binding/JavascriptCompilationTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tests/Binding/JavascriptCompilationTests.cs b/src/Tests/Binding/JavascriptCompilationTests.cs index f86d57076a..e7daabc72b 100644 --- a/src/Tests/Binding/JavascriptCompilationTests.cs +++ b/src/Tests/Binding/JavascriptCompilationTests.cs @@ -999,8 +999,8 @@ public void JsTranslator_MathMethods(string binding, string expected) } [TestMethod] - [DataRow("Convert.ToBoolean(IntProp)", "Boolean(IntProp())")] - [DataRow("Convert.ToBoolean(DoubleProp)", "Boolean(DoubleProp())")] + [DataRow("Convert.ToBoolean(IntProp)", "window.Boolean(IntProp())")] + [DataRow("Convert.ToBoolean(DoubleProp)", "window.Boolean(DoubleProp())")] [DataRow("Convert.ToDecimal(DoubleProp)", "DoubleProp")] [DataRow("Convert.ToInt32(DoubleProp)", "Math.round(DoubleProp())")] [DataRow("Convert.ToByte(DoubleProp)", "Math.round(DoubleProp())")] @@ -1261,6 +1261,7 @@ public void JavascriptCompilation_ApiRefreshOn() [TestMethod] public void JavascriptCompilation_MarkupControlProperty() { + _ = TestMarkupControl.SomePropertyProperty; var dataContext = bindingHelper.CreateDataContext(new [] { typeof(object) }, markupControl: typeof(TestMarkupControl)); var result = bindingHelper.ValueBindingToJs("_control.SomeProperty + 'aa'", dataContext, niceMode: false); Assert.AreEqual("($control.SomeProperty()??\"\")+\"aa\"", result);