Files
jsmr/JSMR.Tests/Ingestion/VoiceWorkIngestionTests.cs

49 lines
1.4 KiB
C#

using JSMR.Application.Scanning.Contracts;
using JSMR.Infrastructure.Common.Time;
using JSMR.Infrastructure.Data;
using JSMR.Infrastructure.Ingestion;
using NSubstitute;
using Shouldly;
namespace JSMR.Tests.Ingestion;
//public class VoiceWorkIngestionTests(VoiceWorkIngestionFixture fixture)
//{
// [Fact]
// public async Task Simple_Upsert()
// {
// await using AppDbContext context = fixture.CreateDbContext();
// VoiceWorkIngest[] ingests =
// [
// // TODO
// //new()
// //{
// // MakerId = "RG00001",
// // MakerName = "Good Dreams",
// // ProductId = "A Newly Announced Work",
// // Title = "",
// // Description = ""
// //},
// //new()
// //{
// // MakerId = "RG00002",
// // MakerName = "Sweet Dreams",
// // ProductId = "",
// // Title = "",
// // Description = ""
// //}
// ];
// IClock clock = Substitute.For<IClock>();
// clock.UtcNow.Returns(new DateTimeOffset(2025, 1, 3, 0, 0, 0, 0, TimeSpan.FromSeconds(0)));
// TokyoTimeProvider timeProvider = new(clock);
// VoiceWorkUpdater updater = new(context, timeProvider);
// await updater.UpsertAsync(ingests, CancellationToken.None);
// // TODO
// //context.VoiceWorks.Count().ShouldBe(2);
// }
//}