Skip to content

Commit 57bb9ec

Browse files
committed
Fixed unit tests and references to System.Drawing.Color in Validators
1 parent d1e2326 commit 57bb9ec

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

samples/AfterBlazorServerSide/Pages/ControlSamples/Validations/RequiredFieldValidatorSample.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@page "/ControlSamples/RequiredFieldValidator"
2-
@using static System.Drawing.Color
2+
@using static BlazorWebFormsComponents.WebColor
33

44
<h3>Required Field Validator</h3>
55
@using BlazorWebFormsComponents.Validations;

samples/AfterBlazorServerSide/Pages/ControlSamples/Validations/ValidationSummarySample.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@page "/ControlSamples/ValidationSummary"
2-
@using static System.Drawing.Color
2+
@using static BlazorWebFormsComponents.WebColor
33

44
<h3>Required Field Validator</h3>
55
@using BlazorWebFormsComponents.Validations;

src/BlazorWebFormsComponents.Test/DataList/TableLayout/ComplexStyle.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
cut.Find("table").HasAttribute("style").ShouldBeTrue();
3333
cut.Find("table").GetAttribute("style").ShouldContain("border-collapse:collapse;");
3434
cut.Find("table").GetAttribute("style").ShouldContain("background-color:");
35-
cut.Find("table").GetAttribute("style").ShouldContain("red");
35+
cut.Find("table").GetAttribute("style").ShouldContain("#FF0000");
3636

3737
cut.Find("table").HasAttribute("cellpadding").ShouldBeTrue();
3838
cut.Find("table").HasAttribute("cellspacing").ShouldBeTrue();
@@ -43,4 +43,4 @@
4343
}
4444

4545

46-
}
46+
}

src/BlazorWebFormsComponents.Test/DataList/TableLayout/HeaderStyle.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
var theStyle = theHeaderElement.GetAttribute("style");
4646

4747
theStyle.ShouldNotBeNull();
48-
theStyle.ShouldContain("blue");
48+
theStyle.ShouldContain("#0000FF");
4949
theStyle.ShouldContain("border");
5050

5151
}

src/BlazorWebFormsComponents/Validations/AspNetValidationSummary.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public partial class AspNetValidationSummary : BaseWebFormsComponent, IHasStyle,
1717
[CascadingParameter] EditContext CurrentEditContext { get; set; }
1818

1919
[Parameter] public ValidationSummaryDisplayMode DisplayMode { get; set; } = ValidationSummaryDisplayMode.BulletList;
20-
[Parameter] public Color BackColor { get; set; }
21-
[Parameter] public Color BorderColor { get; set; }
20+
[Parameter] public WebColor BackColor { get; set; }
21+
[Parameter] public WebColor BorderColor { get; set; }
2222
[Parameter] public BorderStyle BorderStyle { get; set; }
2323
[Parameter] public Unit BorderWidth { get; set; }
2424
[Parameter] public string CssClass { get; set; }
25-
[Parameter] public Color ForeColor { get; set; }
25+
[Parameter] public WebColor ForeColor { get; set; }
2626
[Parameter] public Unit Height { get; set; }
2727
[Parameter] public HorizontalAlign HorizontalAlign { get; set; }
2828
[Parameter] public VerticalAlign VerticalAlign { get; set; }

src/BlazorWebFormsComponents/Validations/BaseValidator.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public abstract partial class BaseValidator<Type> : BaseWebFormsComponent, IHasS
1515
[Parameter] public ForwardRef<InputBase<Type>> ControlToValidate { get; set; }
1616
[Parameter] public string Text { get; set; }
1717
[Parameter] public string ErrorMessage { get; set; }
18-
[Parameter] public Color ForeColor { get; set; }
18+
[Parameter] public WebColor ForeColor { get; set; }
1919

2020
public bool IsValid { get; set; } = true;
2121

22-
[Parameter] public Color BackColor { get; set; }
23-
[Parameter] public Color BorderColor { get; set; }
22+
[Parameter] public WebColor BackColor { get; set; }
23+
[Parameter] public WebColor BorderColor { get; set; }
2424
[Parameter] public BorderStyle BorderStyle { get; set; }
2525
[Parameter] public Unit BorderWidth { get; set; }
2626
[Parameter] public string CssClass { get; set; }

0 commit comments

Comments
 (0)