Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasherceg committed Oct 22, 2023
1 parent 2a8200f commit 4a8c020
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Tests/Binding/JavascriptCompilationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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())")]
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4a8c020

Please sign in to comment.