Skip to content

Commit

Permalink
Fix iOS broken Handler Test (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed Mar 17, 2021
1 parent 7477a86 commit 7cf46a2
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ public async Task PaddingInitializesCorrectly()
Padding = new Thickness(5, 10, 15, 20)
};

var handler = await CreateHandlerAsync(button);
var uiButton = (UIButton)handler.View;
var insets = uiButton.ContentEdgeInsets;
await InvokeOnMainThreadAsync(async () =>
{
var handler = await CreateHandlerAsync(button);
var uiButton = (UIButton)handler.View;
var insets = uiButton.ContentEdgeInsets;
Assert.Equal(5, insets.Left);
Assert.Equal(10, insets.Top);
Assert.Equal(15, insets.Right);
Assert.Equal(20, insets.Bottom);
Assert.Equal(5, insets.Left);
Assert.Equal(10, insets.Top);
Assert.Equal(15, insets.Right);
Assert.Equal(20, insets.Bottom);
});
}

UIButton GetNativeButton(ButtonHandler buttonHandler) =>
Expand Down

0 comments on commit 7cf46a2

Please sign in to comment.