From f5447484512d726f4403f0d7725777d0a95601fb Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 19 Sep 2023 00:16:36 +0200 Subject: Add more stuff, add unit tests --- Tests/TestDataGenerator/Program.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Tests/TestDataGenerator/Program.cs (limited to 'Tests/TestDataGenerator/Program.cs') diff --git a/Tests/TestDataGenerator/Program.cs b/Tests/TestDataGenerator/Program.cs new file mode 100644 index 0000000..9bd091b --- /dev/null +++ b/Tests/TestDataGenerator/Program.cs @@ -0,0 +1,31 @@ +// See https://aka.ms/new-console-template for more information + +using System.Text.Json; +using System.Text.Json.Serialization; +using ArcaneLibs.Extensions; +using LibMatrix.Services; +using LibMatrix.Utilities.Bot; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using PluralContactBotPoC; +using PluralContactBotPoC.Bot; + +Console.WriteLine("Hello, World!"); + +var host = Host.CreateDefaultBuilder(args).ConfigureServices((_, services) => { + services.AddScoped(x => + new TieredStorageService( + cacheStorageProvider: new FileStorageProvider("bot_data/cache/"), + dataStorageProvider: new FileStorageProvider("bot_data/data/") + ) + ); + // services.AddSingleton(); + services.AddSingleton(); + + services.AddRoryLibMatrixServices(); + services.AddBot(withCommands: false); + + services.AddHostedService(); +}).UseConsoleLifetime().Build(); + +await host.RunAsync(); -- cgit 1.4.1