diff --git a/Common.Test.props b/Common.Test.props index 81c96ec..82d84c1 100644 --- a/Common.Test.props +++ b/Common.Test.props @@ -21,14 +21,11 @@ - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + diff --git a/Common.props b/Common.props index 40704ef..5dec278 100644 --- a/Common.props +++ b/Common.props @@ -70,6 +70,6 @@ - + diff --git a/src/AutoFixture.TUnit/AutoArgumentsAttribute.cs b/src/AutoFixture.TUnit/AutoArgumentsAttribute.cs index cb031d4..cc6a101 100644 --- a/src/AutoFixture.TUnit/AutoArgumentsAttribute.cs +++ b/src/AutoFixture.TUnit/AutoArgumentsAttribute.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; @@ -46,7 +46,7 @@ protected AutoArgumentsAttribute(Func fixtureFactory, params object?[] public override IEnumerable GetData(DataGeneratorMetadata dataGeneratorMetadata) { return new AutoDataSource(this.FixtureFactory, new InlineDataSource(this.Values)) - .GenerateDataSources(dataGeneratorMetadata) + .GetDataSources(dataGeneratorMetadata) .Select(x => x()); } } \ No newline at end of file diff --git a/src/AutoFixture.TUnit/AutoClassDataSourceAttribute.cs b/src/AutoFixture.TUnit/AutoClassDataSourceAttribute.cs index 267303c..20affe5 100644 --- a/src/AutoFixture.TUnit/AutoClassDataSourceAttribute.cs +++ b/src/AutoFixture.TUnit/AutoClassDataSourceAttribute.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; @@ -88,6 +88,6 @@ protected AutoClassDataSourceAttribute(Func fixtureFactory, Type sourc var source = new AutoDataSource(this.FixtureFactory, new ClassDataSource(this.SourceType, this.Parameters)); - return source.GenerateDataSources(dataGeneratorMetadata).Select(x => x()); + return source.GetDataSources(dataGeneratorMetadata).Select(x => x()); } } \ No newline at end of file diff --git a/src/AutoFixture.TUnit/AutoDataSourceAttribute.cs b/src/AutoFixture.TUnit/AutoDataSourceAttribute.cs index 08ab7f0..bde109e 100644 --- a/src/AutoFixture.TUnit/AutoDataSourceAttribute.cs +++ b/src/AutoFixture.TUnit/AutoDataSourceAttribute.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; @@ -46,6 +46,6 @@ protected AutoDataSourceAttribute(Func fixtureFactory) { var source = new AutoDataSource(this.FixtureFactory); - return source.GenerateDataSources(dataGeneratorMetadata).Select(x => x()); + return source.GetDataSources(dataGeneratorMetadata).Select(x => x()); } } \ No newline at end of file diff --git a/src/AutoFixture.TUnit/AutoFixture.TUnit.csproj b/src/AutoFixture.TUnit/AutoFixture.TUnit.csproj index f945639..1322b7c 100644 --- a/src/AutoFixture.TUnit/AutoFixture.TUnit.csproj +++ b/src/AutoFixture.TUnit/AutoFixture.TUnit.csproj @@ -1,9 +1,9 @@ - + - netstandard2.0;net8.0 + net6.0;net8.0 AutoFixture.TUnit @@ -12,7 +12,7 @@ - + diff --git a/src/AutoFixture.TUnit/AutoMemberDataSourceAttribute.cs b/src/AutoFixture.TUnit/AutoMemberDataSourceAttribute.cs index d974f56..db87301 100644 --- a/src/AutoFixture.TUnit/AutoMemberDataSourceAttribute.cs +++ b/src/AutoFixture.TUnit/AutoMemberDataSourceAttribute.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; @@ -100,6 +100,6 @@ protected AutoMemberDataSourceAttribute(Func fixtureFactory, Type? mem createFixture: this.FixtureFactory, source: new MemberDataSource(sourceType, this.MemberName, this.Parameters)); - return source.GenerateDataSources(dataGeneratorMetadata).Select(x => x()); + return source.GetDataSources(dataGeneratorMetadata).Select(x => x()); } } \ No newline at end of file diff --git a/src/AutoFixture.TUnit/BaseDataSourceAttribute.cs b/src/AutoFixture.TUnit/BaseDataSourceAttribute.cs index e72d94e..f6d2494 100644 --- a/src/AutoFixture.TUnit/BaseDataSourceAttribute.cs +++ b/src/AutoFixture.TUnit/BaseDataSourceAttribute.cs @@ -1,11 +1,11 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; /// /// Base class for data sources that provide AutoFixture test data for TUnit data driven tests. /// -public abstract class BaseDataSourceAttribute : NonTypedDataSourceGeneratorAttribute, IDataSource +public abstract class BaseDataSourceAttribute : UntypedDataSourceGeneratorAttribute, IDataSource { /// /// Returns the test data provided by the source. @@ -20,7 +20,7 @@ public abstract class BaseDataSourceAttribute : NonTypedDataSourceGeneratorAttri public abstract IEnumerable GetData(DataGeneratorMetadata dataGeneratorMetadata); /// - public override IEnumerable> GenerateDataSources(DataGeneratorMetadata dataGeneratorMetadata) + protected override IEnumerable> GenerateDataSources(DataGeneratorMetadata dataGeneratorMetadata) { if (dataGeneratorMetadata is null) throw new ArgumentNullException(nameof(dataGeneratorMetadata)); @@ -48,4 +48,9 @@ public abstract class BaseDataSourceAttribute : NonTypedDataSourceGeneratorAttri } } } + + public IEnumerable> GetDataSources(DataGeneratorMetadata dataGeneratorMetadata) + { + return this.GenerateDataSources(dataGeneratorMetadata); + } } diff --git a/src/AutoFixture.TUnit/CompositeDataSourceAttribute.cs b/src/AutoFixture.TUnit/CompositeDataSourceAttribute.cs index 7f97819..fb03866 100644 --- a/src/AutoFixture.TUnit/CompositeDataSourceAttribute.cs +++ b/src/AutoFixture.TUnit/CompositeDataSourceAttribute.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit; @@ -44,7 +44,7 @@ public CompositeDataSourceAttribute(params BaseDataSourceAttribute[] attributes) } var results = this.attributes - .Select(attr => attr.GenerateDataSources(dataGeneratorMetadata)) + .Select(attr => attr.GetDataSources(dataGeneratorMetadata)) .ToArray(); var theoryRows = results diff --git a/src/AutoFixture.TUnit/Internal/ClassDataSource.cs b/src/AutoFixture.TUnit/Internal/ClassDataSource.cs index 60c670d..aa95342 100644 --- a/src/AutoFixture.TUnit/Internal/ClassDataSource.cs +++ b/src/AutoFixture.TUnit/Internal/ClassDataSource.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; namespace AutoFixture.TUnit.Internal; diff --git a/src/AutoFixture.TUnit/Internal/DataGeneratorMetadataExtensions.cs b/src/AutoFixture.TUnit/Internal/DataGeneratorMetadataExtensions.cs index e56c9eb..79573eb 100644 --- a/src/AutoFixture.TUnit/Internal/DataGeneratorMetadataExtensions.cs +++ b/src/AutoFixture.TUnit/Internal/DataGeneratorMetadataExtensions.cs @@ -1,5 +1,6 @@ -using System.Reflection; +using System.Reflection; using TUnit.Core.Enums; +using TUnit.Core.Extensions; namespace AutoFixture.TUnit.Internal; @@ -9,9 +10,9 @@ public static MethodBase GetMethod(this DataGeneratorMetadata dataGeneratorMetad { if (dataGeneratorMetadata.Type == DataGeneratorType.ClassParameters) { - return dataGeneratorMetadata.TestClassType.GetConstructors().First(); + return dataGeneratorMetadata.TestInformation.Class.Type.GetConstructors().First(); } - return dataGeneratorMetadata.TestInformation.ReflectionInformation; + return dataGeneratorMetadata.TestInformation.GetReflectionInfo(); } } \ No newline at end of file diff --git a/src/AutoFixture.TUnit/Internal/IDataSource.cs b/src/AutoFixture.TUnit/Internal/IDataSource.cs index 7fa5279..9087d94 100644 --- a/src/AutoFixture.TUnit/Internal/IDataSource.cs +++ b/src/AutoFixture.TUnit/Internal/IDataSource.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Internal; +namespace AutoFixture.TUnit.Internal; /// /// Exposes the factory method for a sequence of test data. diff --git a/src/AutoFixture.TUnit/Internal/MemberDataSource.cs b/src/AutoFixture.TUnit/Internal/MemberDataSource.cs index a97d2ff..e45020f 100644 --- a/src/AutoFixture.TUnit/Internal/MemberDataSource.cs +++ b/src/AutoFixture.TUnit/Internal/MemberDataSource.cs @@ -81,6 +81,6 @@ private DataSource GetTestDataSource() /// public IEnumerable GetData(DataGeneratorMetadata dataGeneratorMetadata) { - return this.Source.GenerateDataSources(dataGeneratorMetadata).Select(x => x()); + return this.Source.GetDataSources(dataGeneratorMetadata).Select(x => x()); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/AutoArgumentsAttributeTests.cs b/tests/AutoFixture.TUnit.Tests/AutoArgumentsAttributeTests.cs index a90b40b..3ba1984 100644 --- a/tests/AutoFixture.TUnit.Tests/AutoArgumentsAttributeTests.cs +++ b/tests/AutoFixture.TUnit.Tests/AutoArgumentsAttributeTests.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; @@ -99,7 +99,7 @@ public async Task GetDataOrdersCustomizationAttributes(string methodName) var sut = new DerivedAutoArgumentsAttribute(() => fixture); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(typeof(TypeWithCustomizationAttributes), methodName)) + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(typeof(TypeWithCustomizationAttributes), methodName)) .Select(x => x()) .ToArray(); @@ -119,7 +119,7 @@ public async Task ReturnsSingleTestDataWithExpectedValues(BaseDataSourceAttribut object[] expected) { // Act - var actual = attribute.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod.DeclaringType, testMethod.Name)).ToArray(); + var actual = attribute.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod.DeclaringType, testMethod.Name)).ToArray(); // Assert await Assert.That(actual).HasSingleItem(); diff --git a/tests/AutoFixture.TUnit.Tests/AutoDataSourceAttributeTests.cs b/tests/AutoFixture.TUnit.Tests/AutoDataSourceAttributeTests.cs index 9af552a..b14e657 100644 --- a/tests/AutoFixture.TUnit.Tests/AutoDataSourceAttributeTests.cs +++ b/tests/AutoFixture.TUnit.Tests/AutoDataSourceAttributeTests.cs @@ -1,7 +1,7 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; +using ConcreteType = TestTypeFoundation.ConcreteType; namespace AutoFixture.TUnit.Tests; @@ -76,7 +76,7 @@ public async Task GetDataWithNullMethodThrows() var sut = new AutoDataSourceAttribute(); // Act & assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(null!, null!))).ThrowsException(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(null!, null!))).ThrowsException(); } [Test] @@ -103,7 +103,7 @@ public async Task GetDataReturnsCorrectResult() var sut = new DerivedAutoDataSourceAttribute(() => composer); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) .Select(x => x()) .ToArray(); @@ -140,7 +140,7 @@ public async Task GetDataOrdersCustomizationAttributes(string methodName) var sut = new DerivedAutoDataSourceAttribute(() => fixture); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method.DeclaringType, method.Name)) + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method.DeclaringType, method.Name)) .Select(x => x()) .ToArray(); @@ -168,7 +168,7 @@ public async Task ShouldRecognizeAttributesImplementingIParameterCustomizationSo var sut = new DerivedAutoDataSourceAttribute(() => fixture); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method.DeclaringType, method.Name)) + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method.DeclaringType, method.Name)) .Select(x => x()) .ToArray(); diff --git a/tests/AutoFixture.TUnit.Tests/AutoFixture.TUnit.Tests.csproj b/tests/AutoFixture.TUnit.Tests/AutoFixture.TUnit.Tests.csproj index 57224b4..e4e2579 100644 --- a/tests/AutoFixture.TUnit.Tests/AutoFixture.TUnit.Tests.csproj +++ b/tests/AutoFixture.TUnit.Tests/AutoFixture.TUnit.Tests.csproj @@ -4,20 +4,12 @@ - net48;net8.0 + net8.0 disable - - - - win7-x86 - - - - - + diff --git a/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceAttributeTests.cs b/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceAttributeTests.cs index 1aec882..a314567 100644 --- a/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceAttributeTests.cs +++ b/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceAttributeTests.cs @@ -1,8 +1,8 @@ -using System.Collections; +using System.Collections; using AutoFixture.Kernel; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; +using ConcreteType = TestTypeFoundation.ConcreteType; namespace AutoFixture.TUnit.Tests; @@ -61,7 +61,7 @@ public async Task GetDataThrowsWhenSourceTypeNotEnumerable() .GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()).ToArray()).ThrowsExactly(); } @@ -73,7 +73,7 @@ public async Task GetDataThrowsWhenParametersDoNotMatchConstructor() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()).ToArray()).ThrowsException(); } @@ -85,7 +85,7 @@ public async Task GetDataDoesNotThrowWhenSourceYieldsNoResults() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act - var data = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + var data = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) ; // Assert @@ -100,7 +100,7 @@ public async Task GetDataThrowsWhenSourceYieldsNullResults() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()).ToArray()).ThrowsException(); } @@ -112,7 +112,7 @@ public void GetDataDoesNotThrow() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & Assert - sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); + sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); } [Test] @@ -123,7 +123,7 @@ public async Task GetDataReturnsEnumerable() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); // Assert await Assert.That(actual).IsNotNull(); @@ -137,7 +137,7 @@ public async Task GetDataReturnsNonEmptyEnumerable() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); // Assert await Assert.That(actual).IsNotEmpty(); @@ -151,7 +151,7 @@ public async Task GetDataReturnsExpectedTestDataCount() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)); // Assert await Assert.That(actual).HasCount().EqualTo(5); @@ -165,7 +165,7 @@ public async Task GetDataThrowsWhenDataSourceNotEnumerable() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()).ToArray()).ThrowsException(); } @@ -177,7 +177,7 @@ public async Task GetDataThrowsForNonMatchingConstructorTypes() var testMethod = typeof(ExampleTestClass).GetMethod(nameof(ExampleTestClass.TestMethod)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()).ToArray()).ThrowsException(); } @@ -208,7 +208,7 @@ public async Task GetDataOrdersCustomizationAttributes(string methodName) var sut = new DerivedAutoClassDataSourceAttribute(() => fixture, typeof(ClassWithEmptyTestData)); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)) + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)) .Select(x => x()) .ToArray(); @@ -242,7 +242,7 @@ public async Task GetDataReturnsExpectedTestData() [-95, "test-92", EnumType.Second, new Tuple("myValue", 5)] ]; - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()) .ToArray(); @@ -267,7 +267,7 @@ public async Task GetDataReturnsExpectedTestDataFromParameterizedSource() [29, "myValue", EnumType.Third, new Tuple("value", 1)] ]; - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()) .ToArray(); @@ -289,7 +289,7 @@ public async Task TestWithNullParametersPasses() }; // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!)) .Select(x => x()) .ToArray(); diff --git a/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceScenarioTests.cs b/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceScenarioTests.cs index 6489839..e1dafd3 100644 --- a/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceScenarioTests.cs +++ b/tests/AutoFixture.TUnit.Tests/ClassAutoDataSourceScenarioTests.cs @@ -1,4 +1,4 @@ -using AutoFixture.TUnit.Tests.TestTypes; +using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; namespace AutoFixture.TUnit.Tests; diff --git a/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeSufficientDataTest.cs b/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeSufficientDataTest.cs index 350bb84..7de7193 100644 --- a/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeSufficientDataTest.cs +++ b/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeSufficientDataTest.cs @@ -1,8 +1,7 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.Equality; namespace AutoFixture.TUnit.Tests; @@ -24,15 +23,14 @@ public async Task GetDataReturnsCorrectResult( var attribute = new CompositeDataSourceAttribute(attributes.ToArray()); var dataGeneratorMetadata = DataGeneratorMetadataHelper .CreateDataGeneratorMetadata(this.method); - var comparer = new CollectionEquivalentToEqualityComparer(); // Act - var result = attribute.GenerateDataSources(dataGeneratorMetadata) + var result = attribute.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert await Assert.That(result) - .IsEquivalentTo(expectedResult, comparer); + .IsEquivalentTo(expectedResult); } public IEnumerable<( diff --git a/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeTest.cs index be2a383..c2b36f7 100644 --- a/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/CompositeDataSourceAttributeTest.cs @@ -1,6 +1,5 @@ -using System.Reflection; +using System.Reflection; using AutoFixture.TUnit.Tests.TestTypes; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests; @@ -82,7 +81,7 @@ public async Task GetDataWithNullGeneratorMetadataThrows() var sut = new CompositeDataSourceAttribute(); // Act & assert - await Assert.That(() => sut.GenerateDataSources(null!) + await Assert.That(() => sut.GetDataSources(null!) .Select(x => x()).ToArray()).ThrowsException(); } @@ -100,7 +99,7 @@ public async Task GetDataOnMethodWithNoParametersReturnsNoTheory() .CreateDataGeneratorMetadata(method); // Act - var result = sut.GenerateDataSources(dataGeneratorMetadata) + var result = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert diff --git a/tests/AutoFixture.TUnit.Tests/CustomizeAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/CustomizeAttributeTest.cs index 8b7be44..f2e16e8 100644 --- a/tests/AutoFixture.TUnit.Tests/CustomizeAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/CustomizeAttributeTest.cs @@ -1,4 +1,4 @@ -using AutoFixture.TUnit.Tests.TestTypes; +using AutoFixture.TUnit.Tests.TestTypes; namespace AutoFixture.TUnit.Tests; diff --git a/tests/AutoFixture.TUnit.Tests/DataGeneratorMetadataHelper.cs b/tests/AutoFixture.TUnit.Tests/DataGeneratorMetadataHelper.cs index 91ee229..0f22de3 100644 --- a/tests/AutoFixture.TUnit.Tests/DataGeneratorMetadataHelper.cs +++ b/tests/AutoFixture.TUnit.Tests/DataGeneratorMetadataHelper.cs @@ -1,5 +1,7 @@ -using System.Reflection; +using System.Reflection; +using TUnit.Core; using TUnit.Core.Enums; +using TUnit.Core.Extensions; namespace AutoFixture.TUnit.Tests; @@ -12,51 +14,134 @@ public static DataGeneratorMetadata CreateDataGeneratorMetadata(Type type, strin public static DataGeneratorMetadata CreateDataGeneratorMetadata(MethodInfo methodInfo) { + if (methodInfo is null) + { + throw new ArgumentNullException(nameof(methodInfo)); + } + var parameters = methodInfo.GetParameters(); - var type = methodInfo.ReflectedType ?? methodInfo.DeclaringType!; + var declaringType = methodInfo.ReflectedType ?? methodInfo.DeclaringType!; var methodName = methodInfo.Name; var attributes = methodInfo.GetCustomAttributes().ToArray(); - var sourceGeneratedParameterInformations = parameters - .Select(CreateParameter).ToArray(); + // Use reflection to find and create the required TUnit types + var assembly = typeof(DataGeneratorMetadata).Assembly; + + // Find ParameterMetadata type (likely implements IMemberMetadata) + var parameterMetadataType = assembly.GetTypes() + .FirstOrDefault(t => (t.Name == "ParameterMetadata" || t.Name.Contains("Parameter")) && + typeof(IMemberMetadata).IsAssignableFrom(t) && + t.Namespace?.StartsWith("TUnit") == true); + + // Find MethodMetadata type + var methodMetadataType = assembly.GetTypes() + .FirstOrDefault(t => t.Name == "MethodMetadata" && + typeof(MethodMetadata).IsAssignableFrom(t) && + t.Namespace?.StartsWith("TUnit") == true); + + // Find ClassMetadata type + var classMetadataType = assembly.GetTypes() + .FirstOrDefault(t => (t.Name == "ClassMetadata" || t.Name.Contains("Class")) && + t.Namespace?.StartsWith("TUnit") == true); + + if (parameterMetadataType == null || methodMetadataType == null || classMetadataType == null) + { + // Fallback: try to find any type that implements IMemberMetadata + parameterMetadataType = assembly.GetTypes() + .FirstOrDefault(t => typeof(IMemberMetadata).IsAssignableFrom(t) && + !t.IsInterface && + !t.IsAbstract && + t.Namespace?.StartsWith("TUnit") == true); + + if (parameterMetadataType == null) + { + throw new InvalidOperationException( + "Could not find required TUnit types (ParameterMetadata/MethodMetadata). " + + "This may indicate a breaking change in TUnit 1.12 API. " + + "Consider updating tests to use TUnit's actual DataGeneratorMetadata instances."); + } + } + + // Create parameter metadata objects + var memberMetadatas = parameters + .Select(p => CreateParameterMetadata(parameterMetadataType, p)) + .Cast() + .ToArray(); + + // Create class metadata + var classMetadata = CreateClassMetadata(classMetadataType, declaringType); - return new DataGeneratorMetadata + // Create method metadata + var methodMetadata = CreateMethodMetadata(methodMetadataType, declaringType, methodName, attributes, classMetadata, memberMetadatas); + + // Create DataGeneratorMetadata + var metadata = new DataGeneratorMetadata { Type = DataGeneratorType.TestParameters, TestBuilderContext = null!, TestSessionId = null!, - MembersToGenerate = sourceGeneratedParameterInformations - .Cast().ToArray(), - TestInformation = new SourceGeneratedMethodInformation - { - Type = type, - Name = methodName, - Attributes = attributes, - GenericTypeCount = 0, - Class = new SourceGeneratedClassInformation - { - Type = type, - Assembly = null!, - Attributes = type.GetCustomAttributes().ToArray(), - Name = type.Name, - Namespace = null!, - Parameters = [], - Properties = [] - }, - Parameters = sourceGeneratedParameterInformations, - ReturnType = typeof(void), - }, + MembersToGenerate = memberMetadatas, + TestInformation = methodMetadata, TestClassInstance = null!, ClassInstanceArguments = [] }; + + return metadata; } - private static SourceGeneratedParameterInformation CreateParameter(ParameterInfo parameterInfo) + private static object CreateParameterMetadata(Type parameterMetadataType, ParameterInfo parameterInfo) { - return new SourceGeneratedParameterInformation(parameterInfo.ParameterType) + // Try constructor with ParameterType + var constructor = parameterMetadataType.GetConstructors() + .FirstOrDefault(c => c.GetParameters().Length == 1 && + c.GetParameters()[0].ParameterType == typeof(Type)); + + if (constructor != null) { - Name = parameterInfo.Name!, - Attributes = parameterInfo.GetCustomAttributes().ToArray() - }; + var instance = Activator.CreateInstance(parameterMetadataType, parameterInfo.ParameterType)!; + SetProperty(instance, "Name", parameterInfo.Name!); + SetProperty(instance, "Attributes", parameterInfo.GetCustomAttributes().ToArray()); + return instance; + } + + // Fallback: try parameterless constructor + var instance2 = Activator.CreateInstance(parameterMetadataType)!; + SetProperty(instance2, "Type", parameterInfo.ParameterType); + SetProperty(instance2, "Name", parameterInfo.Name!); + SetProperty(instance2, "Attributes", parameterInfo.GetCustomAttributes().ToArray()); + return instance2; + } + + private static object CreateClassMetadata(Type classMetadataType, Type declaringType) + { + var instance = Activator.CreateInstance(classMetadataType)!; + SetProperty(instance, "Type", declaringType); + SetProperty(instance, "Assembly", declaringType.Assembly); + SetProperty(instance, "Attributes", declaringType.GetCustomAttributes().ToArray()); + SetProperty(instance, "Name", declaringType.Name); + SetProperty(instance, "Namespace", declaringType.Namespace); + return instance; + } + + private static MethodMetadata CreateMethodMetadata(Type methodMetadataType, Type declaringType, string methodName, + object[] attributes, object classMetadata, IMemberMetadata[] parameters) + { + var instance = Activator.CreateInstance(methodMetadataType)!; + SetProperty(instance, "Type", declaringType); + SetProperty(instance, "Name", methodName); + SetProperty(instance, "Attributes", attributes); + SetProperty(instance, "Class", classMetadata); + SetProperty(instance, "Parameters", parameters); + SetProperty(instance, "ReturnType", typeof(void)); + return (MethodMetadata)instance; + } + + private static void SetProperty(object obj, string propertyName, object? value) + { + var property = obj.GetType().GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic); + if (property != null && property.CanWrite) + { + property.SetValue(obj, value); + } } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/DependencyConstraintsTests.cs b/tests/AutoFixture.TUnit.Tests/DependencyConstraintsTests.cs index df67e71..c59317a 100644 --- a/tests/AutoFixture.TUnit.Tests/DependencyConstraintsTests.cs +++ b/tests/AutoFixture.TUnit.Tests/DependencyConstraintsTests.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace AutoFixture.TUnit.Tests; diff --git a/tests/AutoFixture.TUnit.Tests/FavorArraysAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/FavorArraysAttributeTest.cs index f0ee622..2a7fa39 100644 --- a/tests/AutoFixture.TUnit.Tests/FavorArraysAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/FavorArraysAttributeTest.cs @@ -1,6 +1,5 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests; @@ -37,8 +36,9 @@ public async Task GetCustomizationReturnsCorrectResult() // Act var result = sut.GetCustomization(parameter); // Assert - var invoker = await Assert.That(result).IsAssignableTo(); - await Assert.That(invoker?.TargetType).IsEqualTo(parameter.ParameterType); - await Assert.That(invoker?.Query).IsAssignableTo(); + await Assert.That(result).IsAssignableTo(); + var invoker = (ConstructorCustomization)result; + await Assert.That(invoker.TargetType).IsEqualTo(parameter.ParameterType); + await Assert.That(invoker.Query).IsAssignableTo(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/FavorEnumerablesAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/FavorEnumerablesAttributeTest.cs index 77838e6..8da8afe 100644 --- a/tests/AutoFixture.TUnit.Tests/FavorEnumerablesAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/FavorEnumerablesAttributeTest.cs @@ -1,6 +1,5 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests; @@ -37,8 +36,9 @@ public async Task GetCustomizationReturnsCorrectResult() // Act var result = sut.GetCustomization(parameter); // Assert - var invoker = await Assert.That(result).IsAssignableTo(); - await Assert.That(invoker?.TargetType).IsEqualTo(parameter.ParameterType); - await Assert.That(invoker?.Query).IsAssignableTo(); + await Assert.That(result).IsAssignableTo(); + var invoker = (ConstructorCustomization)result; + await Assert.That(invoker.TargetType).IsEqualTo(parameter.ParameterType); + await Assert.That(invoker.Query).IsAssignableTo(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/FavorListsAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/FavorListsAttributeTest.cs index 71ec0fe..73ca3f3 100644 --- a/tests/AutoFixture.TUnit.Tests/FavorListsAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/FavorListsAttributeTest.cs @@ -1,6 +1,5 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests; @@ -37,8 +36,9 @@ public async Task GetCustomizationReturnsCorrectResult() // Act var result = sut.GetCustomization(parameter); // Assert - var invoker = await Assert.That(result).IsAssignableTo(); - await Assert.That(invoker?.TargetType).IsEqualTo(parameter.ParameterType); - await Assert.That(invoker?.Query).IsAssignableTo(); + await Assert.That(result).IsAssignableTo(); + var invoker = (ConstructorCustomization)result; + await Assert.That(invoker.TargetType).IsEqualTo(parameter.ParameterType); + await Assert.That(invoker.Query).IsAssignableTo(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/FrozenAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/FrozenAttributeTest.cs index ad3f9a3..4b10bbd 100644 --- a/tests/AutoFixture.TUnit.Tests/FrozenAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/FrozenAttributeTest.cs @@ -1,5 +1,3 @@ -using TUnit.Assertions.AssertConditions.Throws; - namespace AutoFixture.TUnit.Tests; public class FrozenAttributeTest diff --git a/tests/AutoFixture.TUnit.Tests/GreedyAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/GreedyAttributeTest.cs index 25ed9fb..ae9202a 100644 --- a/tests/AutoFixture.TUnit.Tests/GreedyAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/GreedyAttributeTest.cs @@ -1,6 +1,5 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; #if NETCOREAPP1_1 using System.Reflection; #endif @@ -40,8 +39,9 @@ public async Task GetCustomizationReturnsCorrectResult() // Act var result = sut.GetCustomization(parameter); // Assert - var invoker = await Assert.That(result).IsAssignableTo(); - await Assert.That(invoker?.TargetType).IsEqualTo(parameter.ParameterType); - await Assert.That(invoker?.Query).IsAssignableTo(); + await Assert.That(result).IsAssignableTo(); + var invoker = (ConstructorCustomization)result; + await Assert.That(invoker.TargetType).IsEqualTo(parameter.ParameterType); + await Assert.That(invoker.Query).IsAssignableTo(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/Internal/AutoDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/AutoDataSourceTests.cs index c479105..e7e89b2 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/AutoDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/AutoDataSourceTests.cs @@ -1,7 +1,6 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -48,7 +47,7 @@ public async Task GeneratesTestDataUsingFixture() var method = typeof(SampleTestType).GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).Select(x => x()).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).Select(x => x()).ToArray(); // Assert await Assert.That(result).IsNotNull(); @@ -84,7 +83,7 @@ public async Task CombinesTestDataFromSourceWithAutoGeneratedValues() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert await Assert.That(result).IsNotNull(); @@ -116,7 +115,7 @@ public async Task DoesNotGenerateValuesWhenAllValuesProvidedBySource() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert await Assert.That(result).IsNotNull(); @@ -140,7 +139,7 @@ public async Task ReturnsNoTestDataWhenSourceReturnsNoTestData() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert await Assert.That(result).IsEmpty(); @@ -157,7 +156,7 @@ public async Task ThrowsWhenSourceReturnsNull() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)) .ToArray()) .ThrowsException(); } @@ -176,10 +175,10 @@ public async Task DoesNotCustomizeFixtureWhenParametersNotCustomized() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert - await Assert.That(customizations).IsEmpty(); + await Assert.That(customizations.Count).IsEqualTo(0); } [Test] @@ -196,10 +195,10 @@ public async Task CustomizesFixtureUsingParameterCustomizations() .GetMethod(nameof(SampleTestType.TestMethodWithCustomizedParameter)); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert - await Assert.That(customizations).IsNotEmpty(); + await Assert.That(customizations.Count).IsGreaterThan(0); } [Test] @@ -216,14 +215,15 @@ public async Task CustomizationsAreAppliedInExpectedOrder() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleCustomizations)); // Act - _ = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); + _ = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method!)).ToArray(); // Assert using var scope = Assert.Multiple(); await Assert.That(customizations[0]).IsAssignableTo(); await Assert.That(customizations[1]).IsAssignableTo(); - var composite = await Assert.That(customizations[2]).IsAssignableTo(); + await Assert.That(customizations[2]).IsAssignableTo(); + var composite = (CompositeCustomization)customizations[2]; var compositeCustomizations = composite.Customizations.ToArray(); await Assert.That(compositeCustomizations.Length).IsEqualTo(2); diff --git a/tests/AutoFixture.TUnit.Tests/Internal/ClassDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/ClassDataSourceTests.cs index 5d9a363..1c4ea82 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/ClassDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/ClassDataSourceTests.cs @@ -1,8 +1,7 @@ -using System.Collections; +using System.Collections; using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -69,7 +68,7 @@ public async Task ThrowsWhenSourceIsNotEnumerable() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsExactly(); } [Test] @@ -87,7 +86,7 @@ public async Task GeneratesTestDatWithPrimitiveValues() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) .Select(x => x()) .ToArray(); @@ -117,7 +116,7 @@ public async Task ThrowsWhenConstructorParametersDontMatch() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsException(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsException(); } [Test] @@ -130,7 +129,7 @@ public async Task AppliesExpectedConstructorParameters() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray(); // Assert await Assert.That(result.Single()).IsEquivalentTo(new object[] { "y", 25 }); diff --git a/tests/AutoFixture.TUnit.Tests/Internal/DataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/DataSourceTests.cs index 25d8684..e93a570 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/DataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/DataSourceTests.cs @@ -1,6 +1,5 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -25,12 +24,12 @@ public async Task ReturnSingleEmptyArrayWhenMethodHasNoParameters() .GetMethod(nameof(SampleTestType.TestMethodWithoutParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray(); // Assert - var item = await Assert.That(result).HasSingleItem(); - - await Assert.That(item).IsEmpty(); + await Assert.That(result).HasCount(1); + var item = result.Single()(); + await Assert.That(item).HasCount(0); } [Test] @@ -42,7 +41,7 @@ public async Task ThrowsWhenNoDataFoundForMethod() .GetMethod(nameof(SampleTestType.TestMethodWithSingleParameter)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray()).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray()).ThrowsExactly(); } [Test] @@ -57,12 +56,13 @@ public async Task ReturnSingleArrayWithSingleItemWhenMethodHasSingleParameter() .GetMethod(nameof(SampleTestType.TestMethodWithSingleParameter)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray(); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray(); // Assert - var testData = await Assert.That(result).HasSingleItem(); - var argument = await Assert.That(testData).HasSingleItem(); - await Assert.That(argument).IsEqualTo("hello"); + await Assert.That(result).HasCount(1); + var testData = result.Single()(); + await Assert.That(testData).HasCount(1); + await Assert.That(testData[0]).IsEqualTo("hello"); } [Test] @@ -82,18 +82,18 @@ public async Task ReturnsArgumentsFittingTestParameters() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var actual = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) + var actual = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) .Select(x => x()) .ToArray(); // Assert await Assert.That(actual.Length).IsEqualTo(testData.Length); - await Assert.That(actual) - .All() - .Satisfy( - assert => assert.Satisfies(y => y.Length, - y => y.IsBetween(0, 3).WithInclusiveBounds())); + foreach (var item in actual) + { + await Assert.That(item.Length).IsGreaterThanOrEqualTo(0); + await Assert.That(item.Length).IsLessThanOrEqualTo(3); + } } [Test] @@ -106,6 +106,6 @@ public async Task ThrowsWhenTestDataContainsMoreArgumentsThanParameters() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray()).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)).ToArray()).ThrowsExactly(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/Internal/FieldDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/FieldDataSourceTests.cs index 2c0f953..50f79d2 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/FieldDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/FieldDataSourceTests.cs @@ -1,7 +1,6 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -59,7 +58,7 @@ public async Task ThrowsWhenInvokedWithNullTestMethod() var sut = new FieldDataSource(sourceField); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(null!)).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(null!)).ThrowsExactly(); } [Test] @@ -73,7 +72,7 @@ public async Task ThrowsWhenSourceIsNotEnumerable() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)).ToArray()).ThrowsExactly(); } [Test] @@ -93,7 +92,7 @@ public async Task GeneratesTestDataMatchingTestParameters() .GetMethod(nameof(SampleTestType.TestMethodWithRecordTypeParameter)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) .Select(x => x()) .ToArray(); diff --git a/tests/AutoFixture.TUnit.Tests/Internal/InlineDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/InlineDataSourceTests.cs index 64a33bd..80c65c1 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/InlineDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/InlineDataSourceTests.cs @@ -1,6 +1,5 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -46,7 +45,7 @@ public async Task GetTestDataWithNullMethodThrows() ]); // Act & Assert await Assert.That(() => - sut.GenerateDataSources(null!)).ThrowsExactly(); + sut.GetDataSources(null!)).ThrowsExactly(); } [Test] @@ -60,7 +59,7 @@ public async Task SourceThrowsWhenArgumentCountExceedParameterCount() // Act & Assert await Assert.That(() => - sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) + sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) .Select(x => x()).ToArray()) .ThrowsExactly(); } @@ -75,7 +74,7 @@ public async Task ReturnsTestDataWhenArgumentCountMatchesParameterCount() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)); // Assert var testData = await Assert.That(result).HasSingleItem(); @@ -92,7 +91,7 @@ public async Task ReturnsAllArgumentsWhenArgumentCountLessThanParameterCount() .GetMethod(nameof(SampleTestType.TestMethodWithMultipleParameters)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)); + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)); // Assert var testData = await Assert.That(result).HasSingleItem(); diff --git a/tests/AutoFixture.TUnit.Tests/Internal/MemberDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/MemberDataSourceTests.cs index 12b389d..16e6307 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/MemberDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/MemberDataSourceTests.cs @@ -1,6 +1,6 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; -using TUnit.Assertions.AssertConditions.Throws; +using PropertyDataSource = AutoFixture.TUnit.Internal.PropertyDataSource; namespace AutoFixture.TUnit.Tests.Internal; @@ -85,7 +85,7 @@ public async Task InitializesSourceProperty(string memberName, Type expectedInne var sut = new DelegatingMemberDataSource(type, memberName); // Assert - await Assert.That(sut.GetSource()).IsTypeOf(expectedInnerSourceType); + await Assert.That(sut.GetSource()).IsOfType(expectedInnerSourceType); } [Test] diff --git a/tests/AutoFixture.TUnit.Tests/Internal/MethodDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/MethodDataSourceTests.cs index 42aceb6..fcce0ae 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/MethodDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/MethodDataSourceTests.cs @@ -1,7 +1,6 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests.Internal; @@ -81,7 +80,7 @@ public async Task GetTestDataInvokesMethodInfo() var sut = new MethodDataSource(testDataSource); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testData)) + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testData)) .Select(x => x()); // Assert @@ -99,7 +98,7 @@ public async Task ThrowsWhenMemberDoesNotReturnAnEnumerableValue() var sut = new MethodDataSource(dataSource); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testData)).ToArray()).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testData)).ToArray()).ThrowsExactly(); } public static object NonEnumerableTestData() => new(); diff --git a/tests/AutoFixture.TUnit.Tests/Internal/PropertyDataSourceTests.cs b/tests/AutoFixture.TUnit.Tests/Internal/PropertyDataSourceTests.cs index a7ae04c..2e2df0d 100644 --- a/tests/AutoFixture.TUnit.Tests/Internal/PropertyDataSourceTests.cs +++ b/tests/AutoFixture.TUnit.Tests/Internal/PropertyDataSourceTests.cs @@ -1,7 +1,7 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; +using PropertyDataSource = AutoFixture.TUnit.Internal.PropertyDataSource; namespace AutoFixture.TUnit.Tests.Internal; @@ -59,7 +59,7 @@ public async Task ThrowsWhenInvokedWithNullTestMethod() var sut = new PropertyDataSource(sourceProperty); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(null!)).ThrowsExactly(); + await Assert.That(() => sut.GetDataSources(null!)).ThrowsExactly(); } [Test] @@ -73,7 +73,7 @@ public async Task ThrowsWhenSourceIsNotEnumerable() .GetMethod(nameof(SampleTestType.TestMethodWithReferenceTypeParameter)); // Act & Assert - await Assert.That(() => sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) + await Assert.That(() => sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) .ToArray()).ThrowsExactly(); } @@ -95,7 +95,7 @@ public async Task GeneratesTestDataMatchingTestParameters() .GetMethod(nameof(SampleTestType.TestMethodWithRecordTypeParameter)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(method)) .Select(x => x()) .ToArray(); @@ -127,7 +127,7 @@ public async Task ReturnsNullArguments() .GetMethod(nameof(SampleTestType.TestMethodWithRecordTypeParameter)); // Act - var result = sut.GenerateDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) + var result = sut.GetDataSources(DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod)) .Select(x => x()) .ToArray(); diff --git a/tests/AutoFixture.TUnit.Tests/MemberAutoDataSourceAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/MemberAutoDataSourceAttributeTest.cs index 6720fe2..435675e 100644 --- a/tests/AutoFixture.TUnit.Tests/MemberAutoDataSourceAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/MemberAutoDataSourceAttributeTest.cs @@ -1,7 +1,7 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; +using ConcreteType = TestTypeFoundation.ConcreteType; namespace AutoFixture.TUnit.Tests; @@ -97,7 +97,7 @@ public void ThrowsWhenTestMethodNull() // Act & Assert Assert.Throws( - () => _ = sut.GenerateDataSources(null!).Select(x => x()).ToArray()); + () => _ = sut.GetDataSources(null!).Select(x => x()).ToArray()); } [Test] @@ -146,7 +146,7 @@ public async Task ThrowsWhenMemberDoesNotExist() // Act & Assert var ex = Assert.Throws( - () => sut.GenerateDataSources(dataGeneratorMetadata).Select(x => x()).ToArray()); + () => sut.GetDataSources(dataGeneratorMetadata).Select(x => x()).ToArray()); await Assert.That(ex.Message).Contains(memberName); } @@ -199,11 +199,12 @@ public async Task GetDataOrdersCustomizationAttributes(string methodName) nameof(TestTypeWithMethodData.TestDataWithNoValues)); // Act - _ = sut.GenerateDataSources(dataGeneratorMetadata) + _ = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert - var composite = await Assert.That(customizationLog[0]).IsAssignableTo(); + await Assert.That(customizationLog[0]).IsAssignableTo(); + var composite = (CompositeCustomization)customizationLog[0]; await Assert.That(composite.Customizations.First()).IsNotTypeOf(); await Assert.That(composite.Customizations.Last()).IsAssignableTo(); } @@ -225,7 +226,7 @@ public async Task GeneratesTestsFromParameterlessMethod() }; // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()) .ToArray(); @@ -250,7 +251,7 @@ public async Task GeneratesTestsFromMethodWithParameter() }; // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); await Assert.That(testData).IsEquivalentTo(expected); @@ -273,7 +274,7 @@ public async Task GeneratesTestDataForTestsWithMultipleParameters() }; // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert @@ -291,7 +292,7 @@ public async Task GeneratesMissingDataForTestsWithMultipleParameters() .CreateDataGeneratorMetadata(testMethod!); // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); var arguments1 = testData[0]; @@ -332,7 +333,7 @@ public async Task GeneratesTestDataWithInjectedParameters() }; // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert @@ -349,7 +350,7 @@ public async Task AutoGeneratesValuesForFrozenParameters() var dataGeneratorMetadata = DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!); // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); var arguments1 = testData[0]; @@ -389,7 +390,7 @@ public async Task SupportsInheritedTestDataMembers() var dataGeneratorMetadata = DataGeneratorMetadataHelper.CreateDataGeneratorMetadata(testMethod!); // Act - var testData = sut.GenerateDataSources(dataGeneratorMetadata) + var testData = sut.GetDataSources(dataGeneratorMetadata) .Select(x => x()).ToArray(); // Assert diff --git a/tests/AutoFixture.TUnit.Tests/ModestAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/ModestAttributeTest.cs index 3757d67..1dea86f 100644 --- a/tests/AutoFixture.TUnit.Tests/ModestAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/ModestAttributeTest.cs @@ -1,6 +1,5 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; namespace AutoFixture.TUnit.Tests; @@ -38,8 +37,9 @@ public async Task GetCustomizationReturnsCorrectResult() var result = sut.GetCustomization(parameter); // Assert - var invoker = await Assert.That(result).IsAssignableTo(); - await Assert.That(invoker?.TargetType).IsEqualTo(parameter.ParameterType); - await Assert.That(invoker?.Query).IsAssignableTo(); + await Assert.That(result).IsAssignableTo(); + var invoker = (ConstructorCustomization)result; + await Assert.That(invoker.TargetType).IsEqualTo(parameter.ParameterType); + await Assert.That(invoker.Query).IsAssignableTo(); } } \ No newline at end of file diff --git a/tests/AutoFixture.TUnit.Tests/NoAutoPropertiesAttributeTest.cs b/tests/AutoFixture.TUnit.Tests/NoAutoPropertiesAttributeTest.cs index 7025062..07d55c2 100644 --- a/tests/AutoFixture.TUnit.Tests/NoAutoPropertiesAttributeTest.cs +++ b/tests/AutoFixture.TUnit.Tests/NoAutoPropertiesAttributeTest.cs @@ -1,5 +1,4 @@ -using TestTypeFoundation; -using TUnit.Assertions.AssertConditions.Throws; +using TestTypeFoundation; namespace AutoFixture.TUnit.Tests; diff --git a/tests/AutoFixture.TUnit.Tests/Scenario.cs b/tests/AutoFixture.TUnit.Tests/Scenario.cs index 2732b65..4c35702 100644 --- a/tests/AutoFixture.TUnit.Tests/Scenario.cs +++ b/tests/AutoFixture.TUnit.Tests/Scenario.cs @@ -1,7 +1,8 @@ -using System.Collections; +using System.Collections; using System.ComponentModel.DataAnnotations; using AutoFixture.TUnit.Tests.TestTypes; using TestTypeFoundation; +using ConcreteType = TestTypeFoundation.ConcreteType; namespace AutoFixture.TUnit.Tests; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/ChildTestTypeMethodData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/ChildTestTypeMethodData.cs index 79a6ed5..0b58427 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/ChildTestTypeMethodData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/ChildTestTypeMethodData.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithEmptyTestData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithEmptyTestData.cs index 276aca2..81b1090 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithEmptyTestData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithEmptyTestData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithNullTestData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithNullTestData.cs index e95410f..5a4689c 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithNullTestData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/ClassWithNullTestData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/CompositeTypeWithOverloadedConstructors.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/CompositeTypeWithOverloadedConstructors.cs index b7c8744..e487f29 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/CompositeTypeWithOverloadedConstructors.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/CompositeTypeWithOverloadedConstructors.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; public class CompositeTypeWithOverloadedConstructors { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomization.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomization.cs index d297a7c..188bf4b 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomization.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomization.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; internal class DelegatingCustomization : ICustomization { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomizeAttribute.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomizeAttribute.cs index b04bd83..d48fbf4 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomizeAttribute.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingCustomizeAttribute.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingDataSource.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingDataSource.cs index 99147ce..530e104 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingDataSource.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingDataSource.cs @@ -1,4 +1,4 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingFixture.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingFixture.cs index 1615294..3c93ccb 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingFixture.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingFixture.cs @@ -1,4 +1,4 @@ -using AutoFixture.Dsl; +using AutoFixture.Dsl; using AutoFixture.Kernel; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingMemberDataSource.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingMemberDataSource.cs index 7f198ba..45ddfda 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingMemberDataSource.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingMemberDataSource.cs @@ -1,4 +1,4 @@ -using AutoFixture.TUnit.Internal; +using AutoFixture.TUnit.Internal; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingSpecimenBuilder.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingSpecimenBuilder.cs index c5d6e79..ef5ac8e 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingSpecimenBuilder.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingSpecimenBuilder.cs @@ -1,4 +1,4 @@ -using AutoFixture.Kernel; +using AutoFixture.Kernel; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingTestData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingTestData.cs index b8d688b..98a718a 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingTestData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DelegatingTestData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoClassDataSourceAttribute.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoClassDataSourceAttribute.cs index 92fe044..f57a81c 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoClassDataSourceAttribute.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoClassDataSourceAttribute.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; public class DerivedAutoClassDataSourceAttribute : AutoClassDataSourceAttribute { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoDataSourceAttribute.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoDataSourceAttribute.cs index e8f3dee..450452f 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoDataSourceAttribute.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoDataSourceAttribute.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; public class DerivedAutoDataSourceAttribute : AutoDataSourceAttribute { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoMemberDataSourceAttribute.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoMemberDataSourceAttribute.cs index 0daf5ec..0e9378c 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoMemberDataSourceAttribute.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/DerivedAutoMemberDataSourceAttribute.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; public class DerivedAutoMemberDataSourceAttribute : AutoMemberDataSourceAttribute { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/EmptyClassData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/EmptyClassData.cs index b9a8f61..5a796f9 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/EmptyClassData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/EmptyClassData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/ExampleTestClass.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/ExampleTestClass.cs index 8f3b637..d10d56c 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/ExampleTestClass.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/ExampleTestClass.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using TestTypeFoundation; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/FakeDataAttribute.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/FakeDataAttribute.cs index 9870480..956d520 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/FakeDataAttribute.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/FakeDataAttribute.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/MixedTypeClassData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/MixedTypeClassData.cs index e6b2243..8baece1 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/MixedTypeClassData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/MixedTypeClassData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using TestTypeFoundation; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/MyClass.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/MyClass.cs index c955db3..86b3a18 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/MyClass.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/MyClass.cs @@ -1,4 +1,4 @@ -namespace AutoFixture.TUnit.Tests.TestTypes; +namespace AutoFixture.TUnit.Tests.TestTypes; public class MyClass { diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/ParameterizedClassData.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/ParameterizedClassData.cs index 59d2452..04e97f4 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/ParameterizedClassData.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/ParameterizedClassData.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using TestTypeFoundation; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/SampleTestType.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/SampleTestType.cs index 7e5ec85..6b62a5b 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/SampleTestType.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/SampleTestType.cs @@ -1,4 +1,4 @@ -using TestTypeFoundation; +using TestTypeFoundation; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithCustomizationAttributes.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithCustomizationAttributes.cs index aa2ff5a..7ce4736 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithCustomizationAttributes.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithCustomizationAttributes.cs @@ -1,4 +1,5 @@ -using TestTypeFoundation; +using TestTypeFoundation; +using ConcreteType = TestTypeFoundation.ConcreteType; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithIParameterCustomizationSourceUsage.cs b/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithIParameterCustomizationSourceUsage.cs index 8099949..c51089a 100644 --- a/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithIParameterCustomizationSourceUsage.cs +++ b/tests/AutoFixture.TUnit.Tests/TestTypes/TypeWithIParameterCustomizationSourceUsage.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace AutoFixture.TUnit.Tests.TestTypes; diff --git a/tests/TestTypeFoundation/AbstractClassWithPublicConstructor.cs b/tests/TestTypeFoundation/AbstractClassWithPublicConstructor.cs index 1e038eb..d79fb1d 100644 --- a/tests/TestTypeFoundation/AbstractClassWithPublicConstructor.cs +++ b/tests/TestTypeFoundation/AbstractClassWithPublicConstructor.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public abstract class AbstractClassWithPublicConstructor { diff --git a/tests/TestTypeFoundation/AbstractType.cs b/tests/TestTypeFoundation/AbstractType.cs index ab273cd..0dedb19 100644 --- a/tests/TestTypeFoundation/AbstractType.cs +++ b/tests/TestTypeFoundation/AbstractType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public abstract class AbstractType { diff --git a/tests/TestTypeFoundation/AbstractTypeWithConstructorWithMultipleParameters.cs b/tests/TestTypeFoundation/AbstractTypeWithConstructorWithMultipleParameters.cs index 1ab088a..8d2bb2f 100644 --- a/tests/TestTypeFoundation/AbstractTypeWithConstructorWithMultipleParameters.cs +++ b/tests/TestTypeFoundation/AbstractTypeWithConstructorWithMultipleParameters.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public abstract class AbstractTypeWithConstructorWithMultipleParameters { diff --git a/tests/TestTypeFoundation/AbstractTypeWithNonDefaultConstructor.cs b/tests/TestTypeFoundation/AbstractTypeWithNonDefaultConstructor.cs index 17a2342..35eb97d 100644 --- a/tests/TestTypeFoundation/AbstractTypeWithNonDefaultConstructor.cs +++ b/tests/TestTypeFoundation/AbstractTypeWithNonDefaultConstructor.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public abstract class AbstractTypeWithNonDefaultConstructor { diff --git a/tests/TestTypeFoundation/CollectionHolder.cs b/tests/TestTypeFoundation/CollectionHolder.cs index b0c5432..f59c3c3 100644 --- a/tests/TestTypeFoundation/CollectionHolder.cs +++ b/tests/TestTypeFoundation/CollectionHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class CollectionHolder { diff --git a/tests/TestTypeFoundation/CompositeType.cs b/tests/TestTypeFoundation/CompositeType.cs index 11c503c..2252144 100644 --- a/tests/TestTypeFoundation/CompositeType.cs +++ b/tests/TestTypeFoundation/CompositeType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class CompositeType : AbstractType { diff --git a/tests/TestTypeFoundation/ConcreteType.cs b/tests/TestTypeFoundation/ConcreteType.cs index 5748a47..b2e0902 100644 --- a/tests/TestTypeFoundation/ConcreteType.cs +++ b/tests/TestTypeFoundation/ConcreteType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ConcreteType : AbstractType { diff --git a/tests/TestTypeFoundation/ConcreteTypeWithPrivateParameterlessConstructor.cs b/tests/TestTypeFoundation/ConcreteTypeWithPrivateParameterlessConstructor.cs index c9ce80c..0e443c8 100644 --- a/tests/TestTypeFoundation/ConcreteTypeWithPrivateParameterlessConstructor.cs +++ b/tests/TestTypeFoundation/ConcreteTypeWithPrivateParameterlessConstructor.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ConcreteTypeWithPrivateParameterlessConstructor { diff --git a/tests/TestTypeFoundation/DoubleFieldHolder.cs b/tests/TestTypeFoundation/DoubleFieldHolder.cs index ed1cb9c..8df1ad3 100644 --- a/tests/TestTypeFoundation/DoubleFieldHolder.cs +++ b/tests/TestTypeFoundation/DoubleFieldHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class DoubleFieldHolder { diff --git a/tests/TestTypeFoundation/DoubleParameterType.cs b/tests/TestTypeFoundation/DoubleParameterType.cs index 89f5a2a..54c20e9 100644 --- a/tests/TestTypeFoundation/DoubleParameterType.cs +++ b/tests/TestTypeFoundation/DoubleParameterType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class DoubleParameterType { diff --git a/tests/TestTypeFoundation/DoublePropertyHolder.cs b/tests/TestTypeFoundation/DoublePropertyHolder.cs index 2087e7f..4197ca3 100644 --- a/tests/TestTypeFoundation/DoublePropertyHolder.cs +++ b/tests/TestTypeFoundation/DoublePropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class DoublePropertyHolder { diff --git a/tests/TestTypeFoundation/EmptyEnum.cs b/tests/TestTypeFoundation/EmptyEnum.cs index 224363e..0317d29 100644 --- a/tests/TestTypeFoundation/EmptyEnum.cs +++ b/tests/TestTypeFoundation/EmptyEnum.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public enum EmptyEnum { diff --git a/tests/TestTypeFoundation/EnumType.cs b/tests/TestTypeFoundation/EnumType.cs index 8c64374..1a12f2c 100644 --- a/tests/TestTypeFoundation/EnumType.cs +++ b/tests/TestTypeFoundation/EnumType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public enum EnumType { diff --git a/tests/TestTypeFoundation/EqualityResponder.cs b/tests/TestTypeFoundation/EqualityResponder.cs index 35aaab2..1b85954 100644 --- a/tests/TestTypeFoundation/EqualityResponder.cs +++ b/tests/TestTypeFoundation/EqualityResponder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class EqualityResponder { diff --git a/tests/TestTypeFoundation/FieldHolder.cs b/tests/TestTypeFoundation/FieldHolder.cs index c3135eb..9c6cb2b 100644 --- a/tests/TestTypeFoundation/FieldHolder.cs +++ b/tests/TestTypeFoundation/FieldHolder.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace TestTypeFoundation; diff --git a/tests/TestTypeFoundation/GuardedConstructorHost.cs b/tests/TestTypeFoundation/GuardedConstructorHost.cs index 418a627..2a04bae 100644 --- a/tests/TestTypeFoundation/GuardedConstructorHost.cs +++ b/tests/TestTypeFoundation/GuardedConstructorHost.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class GuardedConstructorHost where T : class diff --git a/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyField.cs b/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyField.cs index df72d37..81382a1 100644 --- a/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyField.cs +++ b/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyField.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class GuardedConstructorHostHoldingStaticReadOnlyField where TItem : class diff --git a/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyProperty.cs b/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyProperty.cs index bd8b30f..b6e2366 100644 --- a/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyProperty.cs +++ b/tests/TestTypeFoundation/GuardedConstructorHostHoldingStaticReadOnlyProperty.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class GuardedConstructorHostHoldingStaticReadOnlyProperty where TItem : class diff --git a/tests/TestTypeFoundation/GuardedMethodHost.cs b/tests/TestTypeFoundation/GuardedMethodHost.cs index b092444..3412572 100644 --- a/tests/TestTypeFoundation/GuardedMethodHost.cs +++ b/tests/TestTypeFoundation/GuardedMethodHost.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class GuardedMethodHost { diff --git a/tests/TestTypeFoundation/IInterface.cs b/tests/TestTypeFoundation/IInterface.cs index e3377b0..2fc5701 100644 --- a/tests/TestTypeFoundation/IInterface.cs +++ b/tests/TestTypeFoundation/IInterface.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public interface IInterface { diff --git a/tests/TestTypeFoundation/IndexedPropertyHolder.cs b/tests/TestTypeFoundation/IndexedPropertyHolder.cs index 45f6adf..1e62744 100644 --- a/tests/TestTypeFoundation/IndexedPropertyHolder.cs +++ b/tests/TestTypeFoundation/IndexedPropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class IndexedPropertyHolder { diff --git a/tests/TestTypeFoundation/InternalGetterPropertyHolder.cs b/tests/TestTypeFoundation/InternalGetterPropertyHolder.cs index 04e5283..0610e46 100644 --- a/tests/TestTypeFoundation/InternalGetterPropertyHolder.cs +++ b/tests/TestTypeFoundation/InternalGetterPropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class InternalGetterPropertyHolder { diff --git a/tests/TestTypeFoundation/ItemContainer.cs b/tests/TestTypeFoundation/ItemContainer.cs index 77395dd..bc2a7cd 100644 --- a/tests/TestTypeFoundation/ItemContainer.cs +++ b/tests/TestTypeFoundation/ItemContainer.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ItemContainer { diff --git a/tests/TestTypeFoundation/ItemHolder.cs b/tests/TestTypeFoundation/ItemHolder.cs index 709e202..f0d6140 100644 --- a/tests/TestTypeFoundation/ItemHolder.cs +++ b/tests/TestTypeFoundation/ItemHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ItemHolder { diff --git a/tests/TestTypeFoundation/MultiUnorderedConstructorType.cs b/tests/TestTypeFoundation/MultiUnorderedConstructorType.cs index 6c299aa..6f6398d 100644 --- a/tests/TestTypeFoundation/MultiUnorderedConstructorType.cs +++ b/tests/TestTypeFoundation/MultiUnorderedConstructorType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class MultiUnorderedConstructorType { diff --git a/tests/TestTypeFoundation/MutableValueType.cs b/tests/TestTypeFoundation/MutableValueType.cs index 724247c..4891ac6 100644 --- a/tests/TestTypeFoundation/MutableValueType.cs +++ b/tests/TestTypeFoundation/MutableValueType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public struct MutableValueType { diff --git a/tests/TestTypeFoundation/MutableValueTypeWithoutConstructor.cs b/tests/TestTypeFoundation/MutableValueTypeWithoutConstructor.cs index 158d1a3..59ec254 100644 --- a/tests/TestTypeFoundation/MutableValueTypeWithoutConstructor.cs +++ b/tests/TestTypeFoundation/MutableValueTypeWithoutConstructor.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public struct MutableValueTypeWithoutConstructor { diff --git a/tests/TestTypeFoundation/NonCompliantCollectionHolder.cs b/tests/TestTypeFoundation/NonCompliantCollectionHolder.cs index 00205a8..cdbbb61 100644 --- a/tests/TestTypeFoundation/NonCompliantCollectionHolder.cs +++ b/tests/TestTypeFoundation/NonCompliantCollectionHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class NonCompliantCollectionHolder { diff --git a/tests/TestTypeFoundation/NoopInterfaceImplementer.cs b/tests/TestTypeFoundation/NoopInterfaceImplementer.cs index b99cd27..6ecc5e7 100644 --- a/tests/TestTypeFoundation/NoopInterfaceImplementer.cs +++ b/tests/TestTypeFoundation/NoopInterfaceImplementer.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class NoopInterfaceImplementer : IInterface { diff --git a/tests/TestTypeFoundation/Properties/AssemblyInfo.cs b/tests/TestTypeFoundation/Properties/AssemblyInfo.cs index 1d950fa..024d383 100644 --- a/tests/TestTypeFoundation/Properties/AssemblyInfo.cs +++ b/tests/TestTypeFoundation/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] diff --git a/tests/TestTypeFoundation/PropertyHolder.cs b/tests/TestTypeFoundation/PropertyHolder.cs index b1e471c..ba9a069 100644 --- a/tests/TestTypeFoundation/PropertyHolder.cs +++ b/tests/TestTypeFoundation/PropertyHolder.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace TestTypeFoundation; diff --git a/tests/TestTypeFoundation/QuadrupleParameterType.cs b/tests/TestTypeFoundation/QuadrupleParameterType.cs index ccb9147..e11a9ab 100644 --- a/tests/TestTypeFoundation/QuadrupleParameterType.cs +++ b/tests/TestTypeFoundation/QuadrupleParameterType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class QuadrupleParameterType { diff --git a/tests/TestTypeFoundation/ReadOnlyFieldHolder.cs b/tests/TestTypeFoundation/ReadOnlyFieldHolder.cs index 30250c9..881ff7d 100644 --- a/tests/TestTypeFoundation/ReadOnlyFieldHolder.cs +++ b/tests/TestTypeFoundation/ReadOnlyFieldHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ReadOnlyFieldHolder { diff --git a/tests/TestTypeFoundation/ReadOnlyPropertyHolder.cs b/tests/TestTypeFoundation/ReadOnlyPropertyHolder.cs index 392624a..278a10b 100644 --- a/tests/TestTypeFoundation/ReadOnlyPropertyHolder.cs +++ b/tests/TestTypeFoundation/ReadOnlyPropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class ReadOnlyPropertyHolder { diff --git a/tests/TestTypeFoundation/SingleParameterType.cs b/tests/TestTypeFoundation/SingleParameterType.cs index e157947..b4bc712 100644 --- a/tests/TestTypeFoundation/SingleParameterType.cs +++ b/tests/TestTypeFoundation/SingleParameterType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class SingleParameterType { diff --git a/tests/TestTypeFoundation/StaticFieldHolder.cs b/tests/TestTypeFoundation/StaticFieldHolder.cs index 738e055..f1dd7ad 100644 --- a/tests/TestTypeFoundation/StaticFieldHolder.cs +++ b/tests/TestTypeFoundation/StaticFieldHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class StaticFieldHolder { diff --git a/tests/TestTypeFoundation/StaticPropertyHolder.cs b/tests/TestTypeFoundation/StaticPropertyHolder.cs index d95b0f7..f62822f 100644 --- a/tests/TestTypeFoundation/StaticPropertyHolder.cs +++ b/tests/TestTypeFoundation/StaticPropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class StaticPropertyHolder { diff --git a/tests/TestTypeFoundation/TriState.cs b/tests/TestTypeFoundation/TriState.cs index c88423c..5992bda 100644 --- a/tests/TestTypeFoundation/TriState.cs +++ b/tests/TestTypeFoundation/TriState.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public enum TriState { diff --git a/tests/TestTypeFoundation/TripleParameterType.cs b/tests/TestTypeFoundation/TripleParameterType.cs index 952e515..e4289c5 100644 --- a/tests/TestTypeFoundation/TripleParameterType.cs +++ b/tests/TestTypeFoundation/TripleParameterType.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TripleParameterType { diff --git a/tests/TestTypeFoundation/TriplePropertyHolder.cs b/tests/TestTypeFoundation/TriplePropertyHolder.cs index f9ec32a..a11defe 100644 --- a/tests/TestTypeFoundation/TriplePropertyHolder.cs +++ b/tests/TestTypeFoundation/TriplePropertyHolder.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TriplePropertyHolder { diff --git a/tests/TestTypeFoundation/TypeWithCastOperatorsWithoutPublicConstructor.cs b/tests/TestTypeFoundation/TypeWithCastOperatorsWithoutPublicConstructor.cs index 300d37c..f275acf 100644 --- a/tests/TestTypeFoundation/TypeWithCastOperatorsWithoutPublicConstructor.cs +++ b/tests/TestTypeFoundation/TypeWithCastOperatorsWithoutPublicConstructor.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithCastOperatorsWithoutPublicConstructor { diff --git a/tests/TestTypeFoundation/TypeWithConcreteParameterMethod.cs b/tests/TestTypeFoundation/TypeWithConcreteParameterMethod.cs index 0007af5..b75737d 100644 --- a/tests/TestTypeFoundation/TypeWithConcreteParameterMethod.cs +++ b/tests/TestTypeFoundation/TypeWithConcreteParameterMethod.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithConcreteParameterMethod { diff --git a/tests/TestTypeFoundation/TypeWithEmptyEnumField.cs b/tests/TestTypeFoundation/TypeWithEmptyEnumField.cs index 4fcdd3c..3d429cc 100644 --- a/tests/TestTypeFoundation/TypeWithEmptyEnumField.cs +++ b/tests/TestTypeFoundation/TypeWithEmptyEnumField.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithEmptyEnumField { diff --git a/tests/TestTypeFoundation/TypeWithFactoryMethod.cs b/tests/TestTypeFoundation/TypeWithFactoryMethod.cs index 6921237..36116c5 100644 --- a/tests/TestTypeFoundation/TypeWithFactoryMethod.cs +++ b/tests/TestTypeFoundation/TypeWithFactoryMethod.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithFactoryMethod { diff --git a/tests/TestTypeFoundation/TypeWithFactoryProperty.cs b/tests/TestTypeFoundation/TypeWithFactoryProperty.cs index 8355290..8676a0a 100644 --- a/tests/TestTypeFoundation/TypeWithFactoryProperty.cs +++ b/tests/TestTypeFoundation/TypeWithFactoryProperty.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithFactoryProperty { diff --git a/tests/TestTypeFoundation/TypeWithIndexer.cs b/tests/TestTypeFoundation/TypeWithIndexer.cs index e5b7c0f..037666f 100644 --- a/tests/TestTypeFoundation/TypeWithIndexer.cs +++ b/tests/TestTypeFoundation/TypeWithIndexer.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithIndexer { diff --git a/tests/TestTypeFoundation/TypeWithOverloadedMembers.cs b/tests/TestTypeFoundation/TypeWithOverloadedMembers.cs index 7751e05..b55026f 100644 --- a/tests/TestTypeFoundation/TypeWithOverloadedMembers.cs +++ b/tests/TestTypeFoundation/TypeWithOverloadedMembers.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace TestTypeFoundation; diff --git a/tests/TestTypeFoundation/TypeWithPseudoFactoryMethod.cs b/tests/TestTypeFoundation/TypeWithPseudoFactoryMethod.cs index 695353f..6b0dc6c 100644 --- a/tests/TestTypeFoundation/TypeWithPseudoFactoryMethod.cs +++ b/tests/TestTypeFoundation/TypeWithPseudoFactoryMethod.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; /// /// This type contains a method that returns an instance of the same type diff --git a/tests/TestTypeFoundation/TypeWithRefMethod.cs b/tests/TestTypeFoundation/TypeWithRefMethod.cs index e709a7e..6b99356 100644 --- a/tests/TestTypeFoundation/TypeWithRefMethod.cs +++ b/tests/TestTypeFoundation/TypeWithRefMethod.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class TypeWithRefMethod { diff --git a/tests/TestTypeFoundation/UnguardedConstructorHost.cs b/tests/TestTypeFoundation/UnguardedConstructorHost.cs index 5ae0dc6..e55546e 100644 --- a/tests/TestTypeFoundation/UnguardedConstructorHost.cs +++ b/tests/TestTypeFoundation/UnguardedConstructorHost.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; namespace TestTypeFoundation; diff --git a/tests/TestTypeFoundation/UnguardedMethodHost.cs b/tests/TestTypeFoundation/UnguardedMethodHost.cs index 6e06bb3..7496293 100644 --- a/tests/TestTypeFoundation/UnguardedMethodHost.cs +++ b/tests/TestTypeFoundation/UnguardedMethodHost.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public class UnguardedMethodHost { diff --git a/tests/TestTypeFoundation/UnguardedStaticMethodOnStaticTypeHost.cs b/tests/TestTypeFoundation/UnguardedStaticMethodOnStaticTypeHost.cs index 338390c..c235631 100644 --- a/tests/TestTypeFoundation/UnguardedStaticMethodOnStaticTypeHost.cs +++ b/tests/TestTypeFoundation/UnguardedStaticMethodOnStaticTypeHost.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public static class UnguardedStaticMethodOnStaticTypeHost { diff --git a/tests/TestTypeFoundation/UnguardedStaticPropertyOnStaticTypeHost.cs b/tests/TestTypeFoundation/UnguardedStaticPropertyOnStaticTypeHost.cs index 92c1dfe..934f64f 100644 --- a/tests/TestTypeFoundation/UnguardedStaticPropertyOnStaticTypeHost.cs +++ b/tests/TestTypeFoundation/UnguardedStaticPropertyOnStaticTypeHost.cs @@ -1,4 +1,4 @@ -namespace TestTypeFoundation; +namespace TestTypeFoundation; public static class UnguardedStaticPropertyOnStaticTypeHost {