diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemExtenderTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemExtenderTests.cs index 5791c8b..69a0f0a 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemExtenderTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemExtenderTests.cs @@ -26,7 +26,6 @@ public class MemberAutoDataItemExtenderTests private readonly Mock dataAttributeProvider = new(); private readonly Mock dataAttribute = new(); private readonly IDataItemExtender converter; - private readonly string memberName; public MemberAutoDataItemExtenderTests() { @@ -34,7 +33,6 @@ public MemberAutoDataItemExtenderTests() this.dataAttributeProvider.Setup(p => p.GetAttribute(this.fixture, It.IsAny())).Returns(this.dataAttribute.Object); this.dataAttribute.Setup(a => a.GetData(It.IsAny())).Returns(data); this.converter = new MemberAutoDataItemExtender(this.fixture, this.dataAttributeProvider.Object); - this.memberName = this.fixture.Create(); } [Fact(DisplayName = "GIVEN provider with no data attribute WHEN Convert is invoked THEN Null is returned")] @@ -50,7 +48,7 @@ public void GivenProviderWithNoDataAttribute_WhenConvertIsInvoked_ThenNullReturn var item = this.fixture.Create(); // Act - var data = noDataConverter.Extend(TestMethod, item, this.memberName); + var data = noDataConverter.Extend(TestMethod, item); // Assert data.Should().BeNull(); @@ -65,7 +63,7 @@ public void GivenValidParameters_WhenConvertIsInvoked_ThenAppropriateCodeIsInvok var item = this.fixture.Create(); // Act - var data = this.converter.Extend(TestMethod, item, this.memberName); + var data = this.converter.Extend(TestMethod, item); // Assert data.Should().NotBeNull(); @@ -80,7 +78,7 @@ public void GivenUninitializedItem_WhenConvertInvoked_ThenNullReturned() const object[] item = null; // Act - var data = this.converter.Extend(TestMethod, item, this.memberName); + var data = this.converter.Extend(TestMethod, item); // Assert data.Should().BeNull(); @@ -94,7 +92,7 @@ public void GivenUninitializedTestMethod_WhenConvertIsInvoked_ThenExceptionIsThr var item = this.fixture.Create(); // Act - Func act = () => this.converter.Extend(method, item, this.memberName); + Func act = () => this.converter.Extend(method, item); // Assert act.Should().Throw() diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs index 3b8b980..324f93f 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs @@ -82,7 +82,7 @@ private object[] ExtendDataItem(MethodInfo testMethod, object[] values) var converter = new MemberAutoDataItemExtender(fixture, this.CreateProvider()); - return converter.Extend(testMethod, values, this.MemberName); + return converter.Extend(testMethod, values); } private Type RetrieveMemberType(MethodInfo testMethod) diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemExtender.cs b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemExtender.cs index 7e3864e..f9781ac 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemExtender.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemExtender.cs @@ -4,6 +4,6 @@ public interface IDataItemExtender { - object[] Extend(MethodInfo testMethod, object[] values, string memberName); + object[] Extend(MethodInfo testMethod, object[] values); } } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemExtender.cs b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemExtender.cs index ef13e5b..f28b950 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemExtender.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemExtender.cs @@ -23,7 +23,7 @@ public MemberAutoDataItemExtender(IFixture fixture, IAutoFixtureInlineAttributeP [SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "Testable design.")] public IAutoFixtureInlineAttributeProvider DataAttributeProvider { get; } - public object[] Extend(MethodInfo testMethod, object[] values, string memberName) + public object[] Extend(MethodInfo testMethod, object[] values) { if (values is null) {