diff --git a/src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj b/src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj index d0e36fcb0..996bb2c11 100644 --- a/src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj +++ b/src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj @@ -8,7 +8,6 @@ - diff --git a/src/CommunityToolkit.Maui.UnitTests/Converters/BoolToObjectConverterTests.cs b/src/CommunityToolkit.Maui.UnitTests/Converters/BoolToObjectConverterTests.cs index 9c2895bba..e85d12a3b 100644 --- a/src/CommunityToolkit.Maui.UnitTests/Converters/BoolToObjectConverterTests.cs +++ b/src/CommunityToolkit.Maui.UnitTests/Converters/BoolToObjectConverterTests.cs @@ -1,5 +1,4 @@ using System.Globalization; -using AutoFixture.Xunit2; using CommunityToolkit.Maui.Converters; using FluentAssertions; using Xunit; @@ -202,39 +201,39 @@ public void BoolToObjectTConverterShouldNotThrowNullInputTest() } [Theory] - [AutoData] - public void BoolToObjectTConverterShouldReturnDefaultValue(string defaultReturnValue) + [InlineData(null)] + [InlineData("")] + [InlineData(" ")] + [InlineData("Hello World")] + public void BoolToObjectTConverterShouldReturnDefaultValue(string? defaultReturnValue) { var options = new Options(); options.SetShouldSuppressExceptionsInConverters(true); -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - var converter = new BoolToObjectConverter + var converter = new BoolToObjectConverter { DefaultConvertReturnValue = defaultReturnValue }; var convertResult = ((ICommunityToolkitValueConverter)converter).Convert(null, typeof(object), null, null); convertResult.Should().Be(defaultReturnValue); -#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. options.SetShouldSuppressExceptionsInConverters(false); } [Theory] - [AutoData] + [InlineData(true)] + [InlineData(false)] public void BoolToObjectTConverterShouldReturnBackDefaultValue(bool backReturnData) { var options = new Options(); options.SetShouldSuppressExceptionsInConverters(true); -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - var converter = new BoolToObjectConverter + var converter = new BoolToObjectConverter { DefaultConvertBackReturnValue = backReturnData }; var convertBackResult = ((ICommunityToolkitValueConverter)converter).ConvertBack(null, typeof(object), null, null); convertBackResult.Should().Be(backReturnData); -#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. options.SetShouldSuppressExceptionsInConverters(false); }