absolute utter filth yet it's working

This commit is contained in:
femsci 2023-11-17 22:46:30 +01:00
parent c3f3cc6acb
commit 7b322ef7fb
Signed by: femsci
GPG key ID: 08F7911F0E650C67
11 changed files with 169 additions and 4 deletions

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Nyanlabs.Umogen.Core;
using Nyanlabs.Umogen.Core.Models;
namespace Nyanlabs.Umogen.WebTests;
public class GenerationTests
{
private Person ModelEmployer => new("Kotek", "Miauczyński", "CBS4327563", "04281308999", new DateTime(2004, 08, 13));
private Person ModelEmployee => new("Miau", "Kotczyński", "CBS69696969", "76011694336", new DateTime(1976, 1, 16));
[Fact]
public async Task Meow4Me()
{
// Given
var rootDir = Environment.CurrentDirectory.Replace("test/Nyanlabs.Umogen.WebTests/bin/Debug/net8.0", "");
UmoEngine eng = new(Path.Combine(rootDir, Core.Umogen.DEFAULT_API_KEY_FILE));
// When
UmoDocument doc = new(UmoDoctype.CONTR_EMPLOYMENT, ModelEmployer, ModelEmployee);
UmoProcess proc = new(eng);
var enu = proc.Ask(doc.NLSerialize());
await foreach (var str in enu)
{
Console.Write(str);
File.AppendAllText("/tmp/doc.md", str);
}
Console.WriteLine("~");
}
}