No payment methods when trying to generate test data

I am generating test data in a console application so I am adding channels programmatically, something that’s working fine for adding countries, delivery methods, etc. which I’m also adding from scratch. Payment methods however, I am of the understanding that I can’t/shouldn’t add, so instead I’m trying to acquire the GUID for the Klarna and the DirectPay: Invoice payment methods. But when I access ModuleECommerce.Instance.PaymentMethods.GetAll() it’s empty. If I later access it when running the actual web project it has several entries. How does this work and is my problem solvable?

Litium version: 7.1.0

Have you install the payment provider addon in the console project?