SpringBoot-freemaker-email-send
SpringBoot-freemaker-email-send copied to clipboard
How to unit test without loading entire SpringBoot context?
Hi, I was using your sample project as a reference point, and it works great - as a full springboot context load, which takes even 30 seconds on actual prod application with dozens of dependencies, beans, stuff that needs be initialized.
I am trying to write simple Junit tests with mocking what I dont need to test directly (like sending the actual email, only test the template works and returns correct html).
I posted the details here: https://stackoverflow.com/questions/59220213/unit-testing-freemarker-templates-uin-springboot-unable-to-initialize-freemark
Butt so far, it seems no one is able to answer.. I am hoping you might be able to improve upon this sample project to show how to do it?
Thanks!