AppFrameworkServiceTest vs AppFrameworkServiceImplTest

Tags: #<Tag:0x00007f5697065de8> #<Tag:0x00007f5697065cf8>

@dkayiwa @mogoodrich @wyclif, I have noticed that AF’s main service is tested through two context-sensitive test classes:

I don’t see any fundamentally good reason for this. I believe it should have been possible for the former to contain all context-sensitive tests and for the latter to be a simple JUnit test class.

I’ve been playing with them a little and I can see that the latter is skipping base setup and tries to operate in a limited context where there is only two apps, while the former is “the real deal” with everything loaded up by Spring.

I have submitted a draft PR that turns AppFrameworkServiceImplTest into 100% JUnit with mocks where they can’t be avoided. I’d be curious to know your thoughts. See here: https://github.com/openmrs/openmrs-module-appframework/pull/43

Cc @samuel34

I haven’t had a chance to look at the code, but conceptually this makes sense to me.

@dkayiwa merged this here. Thanks.