using Elwig.Documents;
using Elwig.Helpers;

namespace Tests.UnitTests.DocumentTests {
    [TestFixture]
    public class LetterheadTest {

        [Test]
        public async Task Test_01_SimpleLetterhead() {
            using var ctx = new AppDbContext();
            var m = await ctx.Members.FindAsync(104);
            using var doc = new Letterhead(m!);
            var text = await Utils.GeneratePdfText(doc);
            Assert.Multiple(() => {
                Assert.That(text, Contains.Substring("WG Test | Genossenschaftsstraße 1 | 2120 Wolkersdorf"));
                Assert.That(text, Contains.Substring("""
                    WINZER Waltraud
                    Wiener Straße 15
                    2120 Wolkersdorf im Weinviertel
                    """));
            });
        }
    }
}
