Hi,
I am writing an API and have come across the following pattern:
My API will force the client user in what he/she writes. The code must test x number of sites on a portal by logging in/out with different credentials. I cannot rely on chance that another developer will write his/her own login code (and this is going to be common code) so I have written an abstract class with a private constructor to implement the logging in and out methods, and the main test method (which the user will have to override to fill in0.
I have not seen an API which imposes restrictions like this but then this is an API for the team.
Am I on the right track with this?