forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing await call for color match test (dotnet#11016)
* Add missing await call for color match test * - remove duplicated ValidateHasColor code * - fix type * - remove async suffix * - clean up extension methods * - add alpha channel to tests * - move BoxView tests to controls from core * - skip tests * - skip some more android tests * - tizen * - skip skip skip
- Loading branch information
Showing
65 changed files
with
262 additions
and
638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Graphics; | ||
using Microsoft.Maui.Handlers; | ||
using Microsoft.Maui.Platform; | ||
|
||
namespace Microsoft.Maui.DeviceTests | ||
{ | ||
public partial class BoxViewTests | ||
{ | ||
MauiShapeView GetNativeBoxView(ShapeViewHandler boxViewViewHandler) => | ||
boxViewViewHandler.PlatformView; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Windows.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Graphics.Win2D; | ||
using Microsoft.Maui.Handlers; | ||
|
||
namespace Microsoft.Maui.DeviceTests | ||
{ | ||
public partial class BoxViewTests | ||
{ | ||
W2DGraphicsView GetNativeBoxView(ShapeViewHandler boxViewHandler) => | ||
boxViewHandler.PlatformView; | ||
} | ||
} |
20 changes: 11 additions & 9 deletions
20
...s/Handlers/BoxView/BoxViewHandlerTests.cs → ...iceTests/Elements/BoxView/BoxViewTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.DeviceTests.Stubs; | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Graphics; | ||
using Microsoft.Maui.Handlers; | ||
using Microsoft.Maui.Hosting; | ||
using Xunit; | ||
|
||
|
||
namespace Microsoft.Maui.DeviceTests | ||
{ | ||
[Category(TestCategory.BoxView)] | ||
public partial class BoxViewHandlerTests : CoreHandlerTestBase<ShapeViewHandler, BoxViewStub> | ||
public partial class BoxViewTests : ControlsHandlerTestBase | ||
{ | ||
[Theory(DisplayName = "BoxView Initializes Correctly")] | ||
[InlineData(0xFF0000)] | ||
[InlineData(0x00FF00)] | ||
[InlineData(0x0000FF)] | ||
[InlineData(0xFFFF0000)] | ||
[InlineData(0xFF00FF00)] | ||
[InlineData(0xFF0000FF)] | ||
public async Task BoxViewInitializesCorrectly(uint color) | ||
{ | ||
var expected = Color.FromUint(color); | ||
|
||
var boxView = new BoxViewStub() | ||
var boxView = new BoxView() | ||
{ | ||
Color = expected, | ||
Height = 100, | ||
Width = 200 | ||
HeightRequest = 100, | ||
WidthRequest = 200 | ||
}; | ||
|
||
await ValidateHasColor(boxView, expected); | ||
await ValidateHasColor(boxView, expected, typeof(ShapeViewHandler)); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.iOS.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Graphics; | ||
using Microsoft.Maui.Handlers; | ||
using Microsoft.Maui.Platform; | ||
|
||
namespace Microsoft.Maui.DeviceTests | ||
{ | ||
public partial class BoxViewTests | ||
{ | ||
MauiShapeView GetNativeBoxView(ShapeViewHandler boxViewHandler) => | ||
boxViewHandler.PlatformView; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.