Tests: Add more DocumentsTests

This commit is contained in:
2024-03-30 09:51:48 +01:00
parent 1047bc6e8f
commit 66898714bb
5 changed files with 97 additions and 6 deletions

View File

@ -5,12 +5,11 @@ namespace Tests.DocumentTests {
[TestFixture]
public class DeliveryNoteTest {
private readonly AppDbContext Context = new();
[Test]
public async Task Test_01_OneDeliveryPart() {
var d = await Context.Deliveries.FindAsync(2020, 1);
using var doc = new DeliveryNote(d!, Context);
using var ctx = new AppDbContext();
var d = await ctx.Deliveries.FindAsync(2020, 1);
using var doc = new DeliveryNote(d!, ctx);
var text = await Utils.GeneratePdfText(doc);
Assert.Multiple(() => {
Assert.That(text, Contains.Substring("""