Skip to content

Commit

Permalink
chore: Adjustments for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed May 8, 2024
1 parent 85b680e commit 3146964
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if HAS_UNO
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -48,3 +49,4 @@ public async Task When_Fluent_And_Theme_Changed()
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class Given_LinearGradientBrush_Faux
public void When_CanApplyToBorder_Wasm_No_Radius()
{
var brush = new LinearGradientBrush();
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });
brush.RelativeTransform = new RotateTransform { Angle = 45 };

Assert.IsTrue(brush.CanApplyToBorder(CornerRadius.None));
Expand All @@ -31,8 +31,8 @@ public void When_CanApplyToBorder_Wasm_No_Radius()
public void When_CanApplyToBorder_Wasm_With_Radius()
{
var brush = new LinearGradientBrush();
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });

Assert.IsFalse(brush.CanApplyToBorder(new CornerRadius(4, 0, 0, 0)));
}
Expand All @@ -43,8 +43,8 @@ public void When_CanApplyToBorder_Wasm_With_Radius()
public void When_CanApplyToBorder_iOS_No_Transform()
{
var brush = new LinearGradientBrush();
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });

Assert.IsTrue(brush.CanApplyToBorder(new CornerRadius(4, 0, 0, 0)));
}
Expand All @@ -53,8 +53,8 @@ public void When_CanApplyToBorder_iOS_No_Transform()
public void When_CanApplyToBorder_iOS_With_Transform()
{
var brush = new LinearGradientBrush();
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });
brush.RelativeTransform = new RotateTransform { Angle = 45 };

Assert.IsFalse(brush.CanApplyToBorder(default));
Expand All @@ -70,10 +70,10 @@ public void When_Dark_ControlElevationBorderBrush()
StartPoint = new Point(0, 0),
EndPoint = new Point(0, 3)
};
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Top, brush.GetMinorStopAlignment());
}

Expand All @@ -87,10 +87,10 @@ public void When_Light_ControlElevationBorderBrush()
EndPoint = new Point(0, 3),
RelativeTransform = new ScaleTransform { ScaleY = -1, CenterY = 0.5 }
};
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1, Color = Microsoft.UI.Colors.Blue });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Bottom, brush.GetMinorStopAlignment());
}

Expand All @@ -103,10 +103,10 @@ public void When_Dark_CircleElevationBorderBrush()
StartPoint = new Point(0, 0),
EndPoint = new Point(0, 1)
};
brush.GradientStops.Add(new GradientStop { Offset = 0.7, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 0.5, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.7, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 0.5, Color = Microsoft.UI.Colors.Blue });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Bottom, brush.GetMinorStopAlignment());
}

Expand All @@ -119,10 +119,10 @@ public void When_Light_CircleElevationBorderBrush()
StartPoint = new Point(0, 0),
EndPoint = new Point(0, 1)
};
brush.GradientStops.Add(new GradientStop { Offset = 0.5, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.7, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 0.5, Color = Microsoft.UI.Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.7, Color = Microsoft.UI.Colors.Red });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Bottom, brush.GetMinorStopAlignment());
}

Expand All @@ -136,10 +136,10 @@ public void When_Dark_AccentControlElevationBorderBrush()
EndPoint = new Point(0, 3),
RelativeTransform = new ScaleTransform { ScaleY = -1, CenterY = 0.5 }
};
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1.0, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1.0, Color = Microsoft.UI.Colors.Blue });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Bottom, brush.GetMinorStopAlignment());
}

Expand All @@ -154,10 +154,10 @@ public void When_Light_AccentControlElevationBorderBrush()
EndPoint = new Point(0, 3),
RelativeTransform = new ScaleTransform { ScaleY = -1, CenterY = 0.5 }
};
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1.0, Color = Colors.Blue });
brush.GradientStops.Add(new GradientStop { Offset = 0.33, Color = Microsoft.UI.Colors.Red });
brush.GradientStops.Add(new GradientStop { Offset = 1.0, Color = Microsoft.UI.Colors.Blue });

Assert.AreEqual(Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(Microsoft.UI.Colors.Blue, brush.GetMajorStop().Color);
Assert.AreEqual(VerticalAlignment.Bottom, brush.GetMinorStopAlignment());
}
}
Expand Down

0 comments on commit 3146964

Please sign in to comment.