diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj
index 5a4db199..f8ed0eb7 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj
@@ -86,17 +86,17 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj
index 3341a0f8..d3eafed2 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj
@@ -112,9 +112,9 @@
all
-
-
-
+
+
+
diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj
index 2863ebbf..0499105d 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj
@@ -87,17 +87,17 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj
index e44eb93a..b4f542d7 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj
@@ -112,9 +112,9 @@
all
-
-
-
+
+
+
diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj
index 1ab1cdda..c005b740 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj
@@ -86,17 +86,17 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj
index ea0ced28..fbf0c2ac 100644
--- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj
+++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj
@@ -112,9 +112,9 @@
all
-
-
-
+
+
+
diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs
index 4e599e4a..3d5e7f73 100644
--- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs
+++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs
@@ -1,6 +1,7 @@
namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Attributes
{
using System;
+ using System.Reflection;
using FluentAssertions;
@@ -17,6 +18,18 @@
[Trait("Category", "DataAttribute")]
public class MemberAutoDataBaseAttributeTests
{
+ private static readonly Type MemberType = typeof(MemberAutoDataBaseAttributeTests);
+ private static readonly MethodInfo TestMethod = MemberType.GetMethod(nameof(MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic);
+
+ public static TheoryData MemberTypeTestData { get; } = new()
+ {
+ { MemberType, MemberType.Name },
+ { typeof(string), nameof(String) },
+ { null, MemberType.Name },
+ };
+
+ public static TheoryData NullTheoryData { get; }
+
[AutoData]
[Theory(DisplayName = "GIVEN uninitialized fixture WHEN constructor is invoked THEN exception is thrown")]
public void GivenUninitializedFixture_WhenConstructorIsInvoked_ThenExceptionIsThrown(string memberName)
@@ -33,6 +46,46 @@ public void GivenUninitializedFixture_WhenConstructorIsInvoked_ThenExceptionIsTh
.And.ParamName.Should().Be("fixture");
}
+ [MemberData(nameof(MemberTypeTestData))]
+ [Theory(DisplayName = "GIVEN item of unexpected type WHEN Convert is invoked THEN exception is thrown")]
+ public void GivenItemOfUnexpectedType_WhenConvertIsInvoked_ThenExceptionIsThrown(
+ Type memberType,
+ string expectedTypeName)
+ {
+ // Arrange
+ var fixture = new Fixture();
+ var memberName = fixture.Create();
+ var item = fixture.Create
\ No newline at end of file