24 lines
1.0 KiB
C#
24 lines
1.0 KiB
C#
using FluentResults;
|
|
using NexusReader.Application.Abstractions.Services;
|
|
using NexusReader.Application.Queries.Quiz;
|
|
|
|
namespace NexusReader.Infrastructure.Services;
|
|
|
|
public sealed class FakeAiGenerateQuizService : IAiGenerateQuizService
|
|
{
|
|
public async Task<Result<QuizDto>> GenerateQuizAsync(string contextBlockId, CancellationToken cancellationToken = default)
|
|
{
|
|
// 2000ms delay to highlight Skeleton loader visually
|
|
await Task.Delay(2000, cancellationToken);
|
|
|
|
var fakeQuiz = new List<QuizQuestionDto>
|
|
{
|
|
new("Co było głównym centrum włoskiego Renesansu?", new List<string> { "Wenecja", "Rzym", "Florencja", "Mediolan" }, 2),
|
|
new("Kto stanowił wpływowy ród mecenasów sztuki?", new List<string> { "Habsburgowie", "Medyceusze", "Borgiowie", "Sforzowie" }, 1),
|
|
new("Jaką koncepcją filozoficzną charakteryzował się renesans?", new List<string> { "Teocentryzmem", "Nihilizmem", "Humanizmem", "Egzystencjalizmem" }, 2)
|
|
};
|
|
|
|
return Result.Ok(new QuizDto(fakeQuiz));
|
|
}
|
|
}
|