lundi 2 mars 2020

Test, that spring application fails to start

I have Factory class that returns different implementations of my service depending on Condition that are supplied by implementation. I have a lot of beans that I store in map and I throw RuntimeException if some of them have equal Conditions. It works and it's fine, but I want to write Unit test for this case. The problem is that Exception occurs when Context is starting, so I have no ideas how to test that Application Fails to start with the right exception.

Aucun commentaire:

Enregistrer un commentaire