-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathShapeTests.cs
36 lines (31 loc) · 929 Bytes
/
ShapeTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Collections;
using System.Threading.Tasks;
using NUnit.Framework;
using ObjCRuntime;
using UIKit;
using CategoryAttribute = NUnit.Framework.CategoryAttribute;
namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS.UnitTests
{
[TestFixture]
public class ShapeTests : PlatformTestFixture
{
public ShapeTests()
{
}
[Test, Category("Shape")]
[Description("Reused ShapeView Renderers Correctly")]
public async Task ReusedShapeViewReRenderers()
{
var view = new Microsoft.Maui.Controls.Shapes.Rectangle
{
Fill = SolidColorBrush.Purple,
HeightRequest = 21,
WidthRequest = 21,
Stroke = SolidColorBrush.Purple
};
var expected = await GetRendererProperty(view, (ver) => ver.NativeView.ToBitmap(), requiresLayout: true);
var actual = await GetRendererProperty(view, (ver) => ver.NativeView.ToBitmap(), requiresLayout: true);
expected.AssertEquals(actual);
}
}
}