Skip to content

Commit 3302ec1

Browse files
committed
fix: fix bug in MultiBoolToVisibilityVisibleValueConverter return type Visibility instead of bool
1 parent 90d608c commit 3302ec1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/Atc.Wpf.Tests/ValueConverters/BoolTo/MultiBoolToVisibilityVisibleValueConverterTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public sealed class MultiBoolToVisibilityVisibleValueConverterTests
1111
private static readonly object[] Empty = [];
1212

1313
[Theory]
14-
[InlineData(true, nameof(AllTrue))]
15-
[InlineData(false, nameof(OneFalse))]
16-
[InlineData(true, nameof(Empty))]
17-
public void Convert_AND_DefaultOperator(bool expected, string inputSetName)
14+
[InlineData(Visibility.Visible, nameof(AllTrue))]
15+
[InlineData(Visibility.Collapsed, nameof(OneFalse))]
16+
[InlineData(Visibility.Visible, nameof(Empty))]
17+
public void Convert_AND_DefaultOperator(Visibility expected, string inputSetName)
1818
{
1919
// Arrange
2020
var input = GetInput(inputSetName);
@@ -27,11 +27,11 @@ public void Convert_AND_DefaultOperator(bool expected, string inputSetName)
2727
}
2828

2929
[Theory]
30-
[InlineData(true, nameof(AllTrue))]
31-
[InlineData(true, nameof(OneFalse))]
32-
[InlineData(false, nameof(AllFalse))]
33-
[InlineData(false, nameof(Empty))]
34-
public void Convert_OR_WithEnumParameter(bool expected, string inputSetName)
30+
[InlineData(Visibility.Visible, nameof(AllTrue))]
31+
[InlineData(Visibility.Visible, nameof(OneFalse))]
32+
[InlineData(Visibility.Collapsed, nameof(AllFalse))]
33+
[InlineData(Visibility.Collapsed, nameof(Empty))]
34+
public void Convert_OR_WithEnumParameter(Visibility expected, string inputSetName)
3535
{
3636
// Arrange
3737
var input = GetInput(inputSetName);
@@ -58,7 +58,7 @@ public void Convert_OR_WithStringParameter()
5858
culture: CultureInfo.InvariantCulture);
5959

6060
// Assert
61-
Assert.True((bool)actual!);
61+
Assert.Equal(Visibility.Visible, actual!);
6262
}
6363

6464
private static object[] GetInput(string name) => name switch

0 commit comments

Comments
 (0)