@@ -65,14 +65,14 @@ await handler.PlatformView.AttachAndRun(async () =>
65
65
66
66
} ) ;
67
67
}
68
-
68
+
69
69
[ Theory ]
70
70
[ InlineData ( ScrollOrientation . Vertical , 100 , 300 , 0 , 100 ) ]
71
71
[ InlineData ( ScrollOrientation . Horizontal , 0 , 100 , 100 , 300 ) ]
72
72
[ InlineData ( ScrollOrientation . Both , 100 , 300 , 100 , 300 ) ]
73
- public async Task TestScrollContentMargin ( ScrollOrientation orientation , int verticalMargin ,
73
+ public async Task TestScrollContentMargin ( ScrollOrientation orientation , int verticalMargin ,
74
74
int expectedHeight , int horizontalMargin , int expectedWidth )
75
- {
75
+ {
76
76
var handler = await SetUpScrollView ( orientation , verticalMargin : verticalMargin , horizontalMargin : horizontalMargin ) ;
77
77
var scroll = handler . VirtualView as ScrollView ;
78
78
@@ -87,19 +87,19 @@ await handler.PlatformView.AttachAndRun(async () =>
87
87
} ) ;
88
88
}
89
89
90
- static async Task AssertContentSizeChanged ( Task < bool > changed )
90
+ static async Task AssertContentSizeChanged ( Task < bool > changed )
91
91
{
92
92
await WaitAssert ( ( ) => changed . IsCompleted && changed . Result , timeout : 5000 , message : "PropertyChanged event with PropertyName 'ContentSize' did not fire" ) . ConfigureAwait ( false ) ;
93
93
}
94
94
95
- static async Task AssertContentSize ( Func < Size > actual , Size expected )
95
+ static async Task AssertContentSize ( Func < Size > actual , Size expected )
96
96
{
97
97
await WaitAssert ( ( ) => CloseEnough ( actual ( ) , expected , 0.2 ) , timeout : 5000 , message : $ "ContentSize was { actual ( ) } , expected { expected } ") ;
98
98
}
99
99
100
- static bool CloseEnough ( Size a , Size b , double tolerance )
100
+ static bool CloseEnough ( Size a , Size b , double tolerance )
101
101
{
102
- if ( System . Math . Abs ( a . Width - b . Width ) > tolerance )
102
+ if ( System . Math . Abs ( a . Width - b . Width ) > tolerance )
103
103
{
104
104
return false ;
105
105
}
@@ -150,7 +150,7 @@ async Task<ScrollViewHandler> SetUpScrollView(ScrollOrientation orientation, int
150
150
return await CreateHandlerAsync < ScrollViewHandler > ( scroll ) ;
151
151
}
152
152
153
- static async Task WaitAssert ( Func < bool > predicate , int interval = 100 , int timeout = 1000 , string message = "" )
153
+ static async Task WaitAssert ( Func < bool > predicate , int interval = 100 , int timeout = 1000 , string message = "" )
154
154
{
155
155
System . Diagnostics . Stopwatch watch = new System . Diagnostics . Stopwatch ( ) ;
156
156
watch . Start ( ) ;
0 commit comments