absolute utter filth yet it's working
This commit is contained in:
parent
c3f3cc6acb
commit
7b322ef7fb
11 changed files with 169 additions and 4 deletions
40
test/Nyanlabs.Umogen.WebTests/GenerationTests.cs
Normal file
40
test/Nyanlabs.Umogen.WebTests/GenerationTests.cs
Normal 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("~");
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue