Source: kevintsengtw/dotnet-testing-agent-skills (MIT). Ported into dotnet-agent-harness.
DateTime and Time-Dependent Testing Guide
Applicable Scenarios
This skill guides how to use Microsoft.Bcl.TimeProvider to solve testing problems with time-dependent code. Through time
abstraction, make "current time" controllable, predictable, and reproducible.
Applicable Scenarios
- Business Hours Validation: System determines whether to allow operations based on current time
- Promotion Control: Logic that activates during specific dates or time periods
- Cache Expiration Mechanism: Determines whether data is valid based on time
- Scheduled Task Triggers: Background jobs that run at scheduled times
- Token Expiration: Security mechanisms that are time-sensitive
Required Packages
<!-- Production code -->
<PackageReference Include="Microsoft.Bcl.TimeProvider" Version="9.0.0" />
<!-- Test project -->
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0" />
```text
---
## Core Principles
### Principle One: Time Abstraction - Replace DateTime with TimeProvider
**Traditional Problem Code**:
```csharp
// ❌ Untestable - uses static time directly
public class OrderService
{
public bool CanPlaceOrder()
{
var now = DateTime.Now;
return now.Hour >= 9 && now.Hour < 17;
}
}
```text
**Testable Refactoring**:
```csharp
// ✅ Testable - receives TimeProvider through dependency injection
public class OrderService
{
private readonly TimeProvider _timeProvider;
public OrderService(TimeProvider timeProvider)
{
_timeProvider = timeProvider ?? throw new ArgumentNullException(nameof(timeProvider));
}
public bool CanPlaceOrder()
{
var now = _timeProvider.GetLocalNow();
return now.Hour >= 9 && now.Hour < 17;
}
}
```text
**Dependency Injection Configuration**:
```csharp
// Program.cs - production environment uses system time
services.AddSingleton(TimeProvider.System);
services.AddScoped<OrderService>();
```text
### Principle Two: FakeTimeProvider Controls Test Time
FakeTimeProvider provides complete time control capabilities:
| Method | Purpose | When to Use |
| ------ | ------- | ----------- |
| `SetUtcNow(DateTimeOffset)` | Set UTC time | When precise UTC time is needed |
| `SetLocalTimeZone(TimeZoneInfo)` | Set local timezone | When testing timezone-related logic |
| `Advance(TimeSpan)` | Fast-forward time | When testing expiration, delay logic |
| `GetUtcNow()` | Get UTC time | Read current simulated time |
| `GetLocalNow()` | Get local time | Read local simulated time |
**Recommended Extension Method**:
```csharp
public static class FakeTimeProviderExtensions
{
/// <summary>
/// Sets FakeTimeProvider local time
/// </summary>
public static void SetLocalNow(this FakeTimeProvider fakeTimeProvider, DateTime localDateTime)
{
fakeTimeProvider.SetLocalTimeZone(TimeZoneInfo.Local);
var utcTime = TimeZoneInfo.ConvertTimeToUtc(localDateTime, TimeZoneInfo.Local);
fakeTimeProvider.SetUtcNow(utcTime);
}
}
```text
### Principle Three: Each Test Uses Independent Time Environment
```csharp
// ✅ Correct: each test creates independent FakeTimeProvider
public class OrderServiceTests
{
[Fact]
public void CanPlaceOrder_DuringBusinessHours_ShouldReturnTrue()
{
// Arrange - independent instance
var fakeTimeProvider = new FakeTimeProvider();
fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, 14, 0, 0));
var sut = new OrderService(fakeTimeProvider);
// Act
var result = sut.CanPlaceOrder();
// Assert
result.Should().BeTrue();
}
}
// ❌ Avoid: multiple tests sharing static instance
public class BadTestClass
{
private static readonly FakeTimeProvider SharedProvider = new(); // will interfere with each other
}
```text
---
## Advanced Time Control Techniques
### Time Freezing
When you need to verify multiple operations occur at the "same time point":
```csharp
[Fact]
public void ProcessBatch_AtFixedTimePoint_ShouldGenerateSameTimestamp()
{
var fakeTimeProvider = new FakeTimeProvider();
var fixedTime = new DateTime(2024, 12, 25, 10, 30, 0);
fakeTimeProvider.SetLocalNow(fixedTime);
var processor = new BatchProcessor(fakeTimeProvider);
var result1 = processor.ProcessItem("Item1");
var result2 = processor.ProcessItem("Item2");
// Time is frozen, both operations have same timestamp
result1.Timestamp.Should().Be(result2.Timestamp);
}
```text
### Time Fast-Forward (Advance)
Test time-sensitive logic like cache expiration, token invalidation:
```csharp
[Fact]
public void Cache_AfterExpirationTime_ShouldClearItems()
{
var fakeTimeProvider = new FakeTimeProvider();
fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, 10, 0, 0));
var cache = new TimedCache(fakeTimeProvider, TimeSpan.FromMinutes(5));
cache.Set("key", "value");
// After 3 minutes - not yet expired
fakeTimeProvider.Advance(TimeSpan.FromMinutes(3));
cache.Get("key").Should().Be("value");
// After another 3 minutes (total 6 minutes) - expired
fakeTimeProvider.Advance(TimeSpan.FromMinutes(3));
cache.Get("key").Should().BeNull();
}
```text
> **Important**: `Advance()` is non-blocking, instantly jumps time without actually waiting.
### Time Rewind
Test historical data processing or replay scenarios:
```csharp
[Fact]
public void HistoricalDataProcessor_GoingBackInTime_ShouldProcessCorrectly()
{
var fakeTimeProvider = new FakeTimeProvider();
var historicalTime = new DateTime(2020, 1, 15, 9, 0, 0);
fakeTimeProvider.SetLocalNow(historicalTime);
var processor = new HistoricalDataProcessor(fakeTimeProvider);
var result = processor.ProcessDataForDate(historicalTime.Date);
result.ProcessedAt.Should().Be(historicalTime);
}
```text
---
## Practical Testing Patterns
### Pattern One: Parameterized Boundary Testing
```csharp
[Theory]
[InlineData(8, false)] // 8 AM - before business hours
[InlineData(9, true)] // 9 AM - business hours start
[InlineData(12, true)] // 12 PM - during business hours
[InlineData(16, true)] // 4 PM - during business hours
[InlineData(17, false)] // 5 PM - business hours end
[InlineData(18, false)] // 6 PM - after business hours
public void CanPlaceOrder_AtDifferentTimes_ShouldReturnCorrectResult(int hour, bool expected)
{
var fakeTimeProvider = new FakeTimeProvider();
fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, hour, 0, 0));
var sut = new OrderService(fakeTimeProvider);
sut.CanPlaceOrder().Should().Be(expected);
}
```text
### Pattern Two: Trading Hours Window Testing
```csharp
[Theory]
[InlineData("09:30:00", true)] // Morning trading hours
[InlineData("12:00:00", false)] // Lunch break
[InlineData("14:30:00", true)] // Afternoon trading hours
[InlineData("15:30:00", false)] // After trading ends
public void IsInTradingHours_AtDifferentTimes_ShouldReturnCorrectResult(string timeStr, bool expected)
{
var fakeTimeProvider = new FakeTimeProvider();
var testTime = DateTime.Today.Add(TimeSpan.Parse(timeStr));
fakeTimeProvider.SetLocalNow(testTime);
var sut = new TradingService(fakeTimeProvider);
sut.IsInTradingHours().Should().Be(expected);
}
```text
### Pattern Three: Schedule Trigger Logic Testing
```csharp
[Theory]
[InlineData("2024-03-15 14:30:00", "2024-03-15 14:00:00", true)] // Time to execute
[InlineData("2024-03-15 13:30:00", "2024-03-15 14:00:00", false)] // Not yet time
public void ShouldExecuteJob_BasedOnTime_ShouldReturnCorrectResult(
string currentTimeStr, string scheduledTimeStr, bool expected)
{
var fakeTimeProvider = new FakeTimeProvider();
fakeTimeProvider.SetLocalNow(DateTime.Parse(currentTimeStr));
var schedule = new JobSchedule { NextExecutionTime = DateTime.Parse(scheduledTimeStr) };
var sut = new ScheduleService(fakeTimeProvider);
sut.ShouldExecuteJob(schedule).Should().Be(expected);
}
```text
---
## AutoFixture Integration
### FakeTimeProviderCustomization
```csharp
public class FakeTimeProviderCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Register(() => new FakeTimeProvider());
}
}
```text
### AutoDataWithCustomization Attribute
```csharp
public class AutoDataWithCustomizationAttribute : AutoDataAttribute
{
public AutoDataWithCustomizationAttribute() : base(CreateFixture)
{
}
private static IFixture CreateFixture()
{
return new Fixture()
.Customize(new AutoNSubstituteCustomization())
.Customize(new FakeTimeProviderCustomization());
}
}
```text
### Using Matching.DirectBaseType
```csharp
[Theory]
[AutoDataWithCustomization]
public void GetTimeBasedDiscount_OnFriday_ShouldReturnTenPercentDiscount(
[Frozen(Matching.DirectBaseType)] FakeTimeProvider fakeTimeProvider,
OrderService sut)
{
// Matching.DirectBaseType tells AutoFixture:
// When TimeProvider (base type) is needed, use FakeTimeProvider (derived type)
var fridayTime = new DateTime(2024, 3, 15, 14, 0, 0); // Friday
fakeTimeProvider.SetLocalNow(fridayTime);
sut.GetTimeBasedDiscount().Should().Be("Happy Friday: 10% Discount");
}
```text
> **Key**: Must use `[Frozen(Matching.DirectBaseType)]`, otherwise AutoFixture cannot correctly inject FakeTimeProvider into constructors requiring TimeProvider.
---
## Best Practices Checklist
### ✅ Code Design
- [ ] All time-dependent classes receive `TimeProvider` through constructor
- [ ] Use `_timeProvider.GetLocalNow()` instead of `DateTime.Now`
- [ ] Use `_timeProvider.GetUtcNow()` instead of `DateTime.UtcNow`
- [ ] DI container registers `TimeProvider.System` as production implementation
### ✅ Test Design
- [ ] Each test method uses independent `FakeTimeProvider` instance
- [ ] Use `SetLocalNow()` extension method to simplify time setup
- [ ] Use `Advance()` to test time-sensitive logic (cache, expiration, delay)
- [ ] Tests cover boundary conditions (start time, end time, critical points)
### ✅ Advanced Considerations
- [ ] FakeTimeProvider is thread-safe, can be used for parallel tests
- [ ] Use `IDisposable` pattern to properly dispose FakeTimeProvider
- [ ] Use `SetLocalTimeZone()` to explicitly set timezone for timezone tests
---
## Reference Resources
### Original Articles
This skill content is distilled from the "Old School Software Engineer's Testing Practice - 30 Day Challenge" article series:
- **Day 16 - Testing Dates and Times: Replace DateTime with Microsoft.Bcl.TimeProvider**
- Article: https://ithelp.ithome.com.tw/articles/10375821
- Sample code: https://github.com/kevintsengtw/30Days_in_Testing_Samples/tree/main/day16
### Official Documentation
- [TimeProvider API](https://learn.microsoft.com/dotnet/api/system.timeprovider)
- [Microsoft.Bcl.TimeProvider NuGet](https://www.nuget.org/packages/Microsoft.Bcl.TimeProvider/)
- [Microsoft.Extensions.TimeProvider.Testing NuGet](https://www.nuget.org/packages/Microsoft.Extensions.TimeProvider.Testing/)
### Related Skills
- `autofixture-basics` - AutoFixture automatic test data generation
- `nsubstitute-mocking` - Test doubles and mocking
- `autodata-xunit-integration` - xUnit and AutoFixture AutoData integration
1---2name: dotnet-testing-datetime-testing-timeprovider3description: Specialized skill for testing time-dependent logic using TimeProvider. Use when testing DateTime, controlling time flow, handling timezone conversions, and testing expiration logic. Covers TimeProvider abstraction, FakeTimeProvider time control, time freezing and fast-forwarding. Keywords: datetime, time testing, TimeProvider, FakeTimeProvider, DateTime.Now, time-dependent, cache expiration, token expiration, Microsoft.Bcl.TimeProvider, GetUtcNow, SetUtcNow, Advance, time freeze, time freezing, time fast-forward4license: MIT5---67Source: kevintsengtw/dotnet-testing-agent-skills (MIT). Ported into dotnet-agent-harness.89# DateTime and Time-Dependent Testing Guide1011## Applicable Scenarios1213This skill guides how to use Microsoft.Bcl.TimeProvider to solve testing problems with time-dependent code. Through time14abstraction, make "current time" controllable, predictable, and reproducible.1516### Applicable Scenarios1718- **Business Hours Validation**: System determines whether to allow operations based on current time19- **Promotion Control**: Logic that activates during specific dates or time periods20- **Cache Expiration Mechanism**: Determines whether data is valid based on time21- **Scheduled Task Triggers**: Background jobs that run at scheduled times22- **Token Expiration**: Security mechanisms that are time-sensitive2324### Required Packages2526````xml27<!-- Production code -->28<PackageReference Include="Microsoft.Bcl.TimeProvider" Version="9.0.0" />2930<!-- Test project -->31<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0" />32```text3334---3536## Core Principles3738### Principle One: Time Abstraction - Replace DateTime with TimeProvider3940**Traditional Problem Code**:4142```csharp43// ❌ Untestable - uses static time directly44public class OrderService45{46 public bool CanPlaceOrder()47 {48 var now = DateTime.Now;49 return now.Hour >= 9 && now.Hour < 17;50 }51}52```text5354**Testable Refactoring**:5556```csharp57// ✅ Testable - receives TimeProvider through dependency injection58public class OrderService59{60 private readonly TimeProvider _timeProvider;6162 public OrderService(TimeProvider timeProvider)63 {64 _timeProvider = timeProvider ?? throw new ArgumentNullException(nameof(timeProvider));65 }6667 public bool CanPlaceOrder()68 {69 var now = _timeProvider.GetLocalNow();70 return now.Hour >= 9 && now.Hour < 17;71 }72}73```text7475**Dependency Injection Configuration**:7677```csharp78// Program.cs - production environment uses system time79services.AddSingleton(TimeProvider.System);80services.AddScoped<OrderService>();81```text8283### Principle Two: FakeTimeProvider Controls Test Time8485FakeTimeProvider provides complete time control capabilities:8687| Method | Purpose | When to Use |88| ------ | ------- | ----------- |89| `SetUtcNow(DateTimeOffset)` | Set UTC time | When precise UTC time is needed |90| `SetLocalTimeZone(TimeZoneInfo)` | Set local timezone | When testing timezone-related logic |91| `Advance(TimeSpan)` | Fast-forward time | When testing expiration, delay logic |92| `GetUtcNow()` | Get UTC time | Read current simulated time |93| `GetLocalNow()` | Get local time | Read local simulated time |9495**Recommended Extension Method**:9697```csharp98public static class FakeTimeProviderExtensions99{100 /// <summary>101 /// Sets FakeTimeProvider local time102 /// </summary>103 public static void SetLocalNow(this FakeTimeProvider fakeTimeProvider, DateTime localDateTime)104 {105 fakeTimeProvider.SetLocalTimeZone(TimeZoneInfo.Local);106 var utcTime = TimeZoneInfo.ConvertTimeToUtc(localDateTime, TimeZoneInfo.Local);107 fakeTimeProvider.SetUtcNow(utcTime);108 }109}110```text111112### Principle Three: Each Test Uses Independent Time Environment113114```csharp115// ✅ Correct: each test creates independent FakeTimeProvider116public class OrderServiceTests117{118 [Fact]119 public void CanPlaceOrder_DuringBusinessHours_ShouldReturnTrue()120 {121 // Arrange - independent instance122 var fakeTimeProvider = new FakeTimeProvider();123 fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, 14, 0, 0));124 var sut = new OrderService(fakeTimeProvider);125126 // Act127 var result = sut.CanPlaceOrder();128129 // Assert130 result.Should().BeTrue();131 }132}133134// ❌ Avoid: multiple tests sharing static instance135public class BadTestClass136{137 private static readonly FakeTimeProvider SharedProvider = new(); // will interfere with each other138}139```text140141---142143## Advanced Time Control Techniques144145### Time Freezing146147When you need to verify multiple operations occur at the "same time point":148149```csharp150[Fact]151public void ProcessBatch_AtFixedTimePoint_ShouldGenerateSameTimestamp()152{153 var fakeTimeProvider = new FakeTimeProvider();154 var fixedTime = new DateTime(2024, 12, 25, 10, 30, 0);155 fakeTimeProvider.SetLocalNow(fixedTime);156157 var processor = new BatchProcessor(fakeTimeProvider);158159 var result1 = processor.ProcessItem("Item1");160 var result2 = processor.ProcessItem("Item2");161162 // Time is frozen, both operations have same timestamp163 result1.Timestamp.Should().Be(result2.Timestamp);164}165```text166167### Time Fast-Forward (Advance)168169Test time-sensitive logic like cache expiration, token invalidation:170171```csharp172[Fact]173public void Cache_AfterExpirationTime_ShouldClearItems()174{175 var fakeTimeProvider = new FakeTimeProvider();176 fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, 10, 0, 0));177178 var cache = new TimedCache(fakeTimeProvider, TimeSpan.FromMinutes(5));179 cache.Set("key", "value");180181 // After 3 minutes - not yet expired182 fakeTimeProvider.Advance(TimeSpan.FromMinutes(3));183 cache.Get("key").Should().Be("value");184185 // After another 3 minutes (total 6 minutes) - expired186 fakeTimeProvider.Advance(TimeSpan.FromMinutes(3));187 cache.Get("key").Should().BeNull();188}189```text190191> **Important**: `Advance()` is non-blocking, instantly jumps time without actually waiting.192193### Time Rewind194195Test historical data processing or replay scenarios:196197```csharp198[Fact]199public void HistoricalDataProcessor_GoingBackInTime_ShouldProcessCorrectly()200{201 var fakeTimeProvider = new FakeTimeProvider();202 var historicalTime = new DateTime(2020, 1, 15, 9, 0, 0);203 fakeTimeProvider.SetLocalNow(historicalTime);204205 var processor = new HistoricalDataProcessor(fakeTimeProvider);206 var result = processor.ProcessDataForDate(historicalTime.Date);207208 result.ProcessedAt.Should().Be(historicalTime);209}210```text211212---213214## Practical Testing Patterns215216### Pattern One: Parameterized Boundary Testing217218```csharp219[Theory]220[InlineData(8, false)] // 8 AM - before business hours221[InlineData(9, true)] // 9 AM - business hours start222[InlineData(12, true)] // 12 PM - during business hours223[InlineData(16, true)] // 4 PM - during business hours224[InlineData(17, false)] // 5 PM - business hours end225[InlineData(18, false)] // 6 PM - after business hours226public void CanPlaceOrder_AtDifferentTimes_ShouldReturnCorrectResult(int hour, bool expected)227{228 var fakeTimeProvider = new FakeTimeProvider();229 fakeTimeProvider.SetLocalNow(new DateTime(2024, 3, 15, hour, 0, 0));230231 var sut = new OrderService(fakeTimeProvider);232233 sut.CanPlaceOrder().Should().Be(expected);234}235```text236237### Pattern Two: Trading Hours Window Testing238239```csharp240[Theory]241[InlineData("09:30:00", true)] // Morning trading hours242[InlineData("12:00:00", false)] // Lunch break243[InlineData("14:30:00", true)] // Afternoon trading hours244[InlineData("15:30:00", false)] // After trading ends245public void IsInTradingHours_AtDifferentTimes_ShouldReturnCorrectResult(string timeStr, bool expected)246{247 var fakeTimeProvider = new FakeTimeProvider();248 var testTime = DateTime.Today.Add(TimeSpan.Parse(timeStr));249 fakeTimeProvider.SetLocalNow(testTime);250251 var sut = new TradingService(fakeTimeProvider);252253 sut.IsInTradingHours().Should().Be(expected);254}255```text256257### Pattern Three: Schedule Trigger Logic Testing258259```csharp260[Theory]261[InlineData("2024-03-15 14:30:00", "2024-03-15 14:00:00", true)] // Time to execute262[InlineData("2024-03-15 13:30:00", "2024-03-15 14:00:00", false)] // Not yet time263public void ShouldExecuteJob_BasedOnTime_ShouldReturnCorrectResult(264 string currentTimeStr, string scheduledTimeStr, bool expected)265{266 var fakeTimeProvider = new FakeTimeProvider();267 fakeTimeProvider.SetLocalNow(DateTime.Parse(currentTimeStr));268269 var schedule = new JobSchedule { NextExecutionTime = DateTime.Parse(scheduledTimeStr) };270 var sut = new ScheduleService(fakeTimeProvider);271272 sut.ShouldExecuteJob(schedule).Should().Be(expected);273}274```text275276---277278## AutoFixture Integration279280### FakeTimeProviderCustomization281282```csharp283public class FakeTimeProviderCustomization : ICustomization284{285 public void Customize(IFixture fixture)286 {287 fixture.Register(() => new FakeTimeProvider());288 }289}290```text291292### AutoDataWithCustomization Attribute293294```csharp295public class AutoDataWithCustomizationAttribute : AutoDataAttribute296{297 public AutoDataWithCustomizationAttribute() : base(CreateFixture)298 {299 }300301 private static IFixture CreateFixture()302 {303 return new Fixture()304 .Customize(new AutoNSubstituteCustomization())305 .Customize(new FakeTimeProviderCustomization());306 }307}308```text309310### Using Matching.DirectBaseType311312```csharp313[Theory]314[AutoDataWithCustomization]315public void GetTimeBasedDiscount_OnFriday_ShouldReturnTenPercentDiscount(316 [Frozen(Matching.DirectBaseType)] FakeTimeProvider fakeTimeProvider,317 OrderService sut)318{319 // Matching.DirectBaseType tells AutoFixture:320 // When TimeProvider (base type) is needed, use FakeTimeProvider (derived type)321322 var fridayTime = new DateTime(2024, 3, 15, 14, 0, 0); // Friday323 fakeTimeProvider.SetLocalNow(fridayTime);324325 sut.GetTimeBasedDiscount().Should().Be("Happy Friday: 10% Discount");326}327```text328329> **Key**: Must use `[Frozen(Matching.DirectBaseType)]`, otherwise AutoFixture cannot correctly inject FakeTimeProvider into constructors requiring TimeProvider.330331---332333## Best Practices Checklist334335### ✅ Code Design336337- [ ] All time-dependent classes receive `TimeProvider` through constructor338- [ ] Use `_timeProvider.GetLocalNow()` instead of `DateTime.Now`339- [ ] Use `_timeProvider.GetUtcNow()` instead of `DateTime.UtcNow`340- [ ] DI container registers `TimeProvider.System` as production implementation341342### ✅ Test Design343344- [ ] Each test method uses independent `FakeTimeProvider` instance345- [ ] Use `SetLocalNow()` extension method to simplify time setup346- [ ] Use `Advance()` to test time-sensitive logic (cache, expiration, delay)347- [ ] Tests cover boundary conditions (start time, end time, critical points)348349### ✅ Advanced Considerations350351- [ ] FakeTimeProvider is thread-safe, can be used for parallel tests352- [ ] Use `IDisposable` pattern to properly dispose FakeTimeProvider353- [ ] Use `SetLocalTimeZone()` to explicitly set timezone for timezone tests354355---356357## Reference Resources358359### Original Articles360361This skill content is distilled from the "Old School Software Engineer's Testing Practice - 30 Day Challenge" article series:362363- **Day 16 - Testing Dates and Times: Replace DateTime with Microsoft.Bcl.TimeProvider**364 - Article: https://ithelp.ithome.com.tw/articles/10375821365 - Sample code: https://github.com/kevintsengtw/30Days_in_Testing_Samples/tree/main/day16366367### Official Documentation368369- [TimeProvider API](https://learn.microsoft.com/dotnet/api/system.timeprovider)370- [Microsoft.Bcl.TimeProvider NuGet](https://www.nuget.org/packages/Microsoft.Bcl.TimeProvider/)371- [Microsoft.Extensions.TimeProvider.Testing NuGet](https://www.nuget.org/packages/Microsoft.Extensions.TimeProvider.Testing/)372373### Related Skills374375- `autofixture-basics` - AutoFixture automatic test data generation376- `nsubstitute-mocking` - Test doubles and mocking377- `autodata-xunit-integration` - xUnit and AutoFixture AutoData integration378````