Hello,

I noticed that the DataSourceTransactionManager constructor was missing unit tests. I added a test to ensure that the afterPropertiesSet method throws an IllegalArgumentException when a null DataSource is provided.

Any feedback on this PR would be appreciated. Thank you!

Comment From: sbrannen

Hi @kwondh5217,

Since the DataSource in the DataSourceTransactionManager(DataSource) is not marked as @Nullable, we expect that the caller never supplies null, and we don't typically write unit tests for such scenarios.

In light of that, I am closing this PR.

Thanks anyway!

Comment From: kwondh5217

Thank you for the review @sbrannen ! I noticed that afterPropertiesSet() contains code that throws an IllegalArgumentException when the default constructor is used. Is it unnecessary to test this scenario as well?