@@ -53,10 +53,10 @@ public void WaitFunctionNumberThrowsOnInvalidArgumentsTest()
5353 var recordType = RecordType . Empty ( ) . Add ( "Text" , FormulaType . Number ) ;
5454 var waitFunction = new WaitFunctionNumber ( Timeout , MockLogger . Object ) ;
5555 var recordValue = new ControlRecordValue ( recordType , MockPowerAppFunctions . Object , "Label1" ) ;
56- Assert . Throws < ArgumentNullException > ( ( ) => waitFunction . Execute ( null , FormulaValue . New ( "Text" ) , FormulaValue . New ( 1 ) ) ) ;
57- Assert . Throws < ArgumentNullException > ( ( ) => waitFunction . Execute ( new SomeOtherRecordValue ( recordType ) , null , FormulaValue . New ( 1 ) ) ) ;
56+ Assert . Throws < ArgumentNullException > ( ( ) => waitFunction . Execute ( null , FormulaValue . New ( "Text" ) , FormulaValue . New ( 1d ) ) ) ;
57+ Assert . Throws < ArgumentNullException > ( ( ) => waitFunction . Execute ( new SomeOtherRecordValue ( recordType ) , null , FormulaValue . New ( 1d ) ) ) ;
5858 Assert . Throws < ArgumentNullException > ( ( ) => waitFunction . Execute ( new SomeOtherRecordValue ( recordType ) , FormulaValue . New ( "Text" ) , null ) ) ;
59- Assert . Throws < InvalidCastException > ( ( ) => waitFunction . Execute ( new SomeOtherRecordValue ( recordType ) , FormulaValue . New ( "Text" ) , FormulaValue . New ( 1 ) ) ) ;
59+ Assert . Throws < InvalidCastException > ( ( ) => waitFunction . Execute ( new SomeOtherRecordValue ( recordType ) , FormulaValue . New ( "Text" ) , FormulaValue . New ( 1d ) ) ) ;
6060 }
6161
6262 [ Fact ]
@@ -141,13 +141,13 @@ public void WaitFunctionImproperValueForStringTest()
141141 public void WaitFunctionNumberSucceedsTest ( )
142142 {
143143 LoggingTestHelper . SetupMock ( MockLogger ) ;
144- var valueToWaitFor = 1 ;
144+ var valueToWaitFor = 1d ;
145145 var recordType = RecordType . Empty ( ) . Add ( "Text" , FormulaType . Number ) ;
146146
147147 var recordValue = new ControlRecordValue ( recordType , MockPowerAppFunctions . Object , "Label1" ) ;
148148 var jsPropertyValueModel = new JSPropertyValueModel ( )
149149 {
150- PropertyValue = valueToWaitFor . ToString ( ) ,
150+ PropertyValue = valueToWaitFor . ToString ( "G" ) ,
151151 } ;
152152 var expectedItemPath = new ItemPath
153153 {
@@ -159,7 +159,7 @@ public void WaitFunctionNumberSucceedsTest()
159159 MockTestState . Setup ( x => x . GetTimeout ( ) ) . Returns ( Timeout ) ;
160160
161161 var waitFunction = new WaitFunctionNumber ( Timeout , MockLogger . Object ) ;
162- waitFunction . Execute ( recordValue , FormulaValue . New ( "Text" ) , NumberValue . New ( valueToWaitFor ) ) ;
162+ waitFunction . Execute ( recordValue , FormulaValue . New ( "Text" ) , FormulaValue . New ( valueToWaitFor ) ) ;
163163
164164 MockPowerAppFunctions . Verify ( x => x . GetPropertyValueFromControl < string > ( It . Is < ItemPath > ( ( itemPath ) => itemPath . ControlName == expectedItemPath . ControlName && itemPath . PropertyName == expectedItemPath . PropertyName ) ) , Times . Exactly ( 2 ) ) ;
165165 }
@@ -185,7 +185,7 @@ public void WaitFunctionImproperValueForNumberTest()
185185 MockTestState . Setup ( x => x . GetTimeout ( ) ) . Returns ( Timeout ) ;
186186
187187 var waitFunction = new WaitFunctionNumber ( Timeout , MockLogger . Object ) ;
188- Assert . Throws < InvalidDataException > ( ( ) => waitFunction . Execute ( recordValue , FormulaValue . New ( "Value" ) , NumberValue . New ( 1 ) ) ) ;
188+ Assert . Throws < InvalidDataException > ( ( ) => waitFunction . Execute ( recordValue , FormulaValue . New ( "Value" ) , FormulaValue . New ( 1d ) ) ) ;
189189 }
190190
191191 [ Fact ]
@@ -405,7 +405,7 @@ public void WaitFunctionStringWaitsForValueToUpdateTest()
405405 public void WaitFunctionNumberWaitsForValueToUpdateTest ( )
406406 {
407407 LoggingTestHelper . SetupMock ( MockLogger ) ;
408- var valueToWaitFor = 1 ;
408+ var valueToWaitFor = 1d ;
409409 var recordType = RecordType . Empty ( ) . Add ( "Text" , FormulaType . Number ) ;
410410 var recordValue = new ControlRecordValue ( recordType , MockPowerAppFunctions . Object , "Label1" ) ;
411411 var jsPropertyValueModel = new JSPropertyValueModel ( )
@@ -414,7 +414,7 @@ public void WaitFunctionNumberWaitsForValueToUpdateTest()
414414 } ;
415415 var finalJsPropertyValueModel = new JSPropertyValueModel ( )
416416 {
417- PropertyValue = valueToWaitFor . ToString ( ) ,
417+ PropertyValue = valueToWaitFor . ToString ( "G" ) ,
418418 } ;
419419 var expectedItemPath = new ItemPath
420420 {
@@ -428,7 +428,7 @@ public void WaitFunctionNumberWaitsForValueToUpdateTest()
428428 MockTestState . Setup ( x => x . GetTimeout ( ) ) . Returns ( Timeout ) ;
429429
430430 var waitFunction = new WaitFunctionNumber ( Timeout , MockLogger . Object ) ;
431- waitFunction . Execute ( recordValue , FormulaValue . New ( "Text" ) , NumberValue . New ( valueToWaitFor ) ) ;
431+ waitFunction . Execute ( recordValue , FormulaValue . New ( "Text" ) , FormulaValue . New ( valueToWaitFor ) ) ;
432432
433433 MockPowerAppFunctions . Verify ( x => x . GetPropertyValueFromControl < string > ( It . Is < ItemPath > ( ( itemPath ) => itemPath . ControlName == expectedItemPath . ControlName && itemPath . PropertyName == expectedItemPath . PropertyName ) ) , Times . Exactly ( 3 ) ) ;
434434 }
@@ -554,7 +554,7 @@ public void WaitFunctionStringTimeoutTest()
554554 public void WaitFunctionNumberTimeoutTest ( )
555555 {
556556 LoggingTestHelper . SetupMock ( MockLogger ) ;
557- var valueToWaitFor = 1 ;
557+ var valueToWaitFor = 1d ;
558558 var recordType = RecordType . Empty ( ) . Add ( "Text" , FormulaType . Number ) ;
559559 var recordValue = new ControlRecordValue ( recordType , MockPowerAppFunctions . Object , "Label1" ) ;
560560 var jsPropertyValueModel = new JSPropertyValueModel ( )
0 commit comments