vendredi 1 juin 2018

Test that method is called with proper parameters all across the software

I've just ran into a problem recently when a method in my service was called with wrong parameters. This caused some kind of outage, so I'm thinking about how to prevent that in the future.

So assuming that I have the following method:

public boolean doSomething(String param1, String param2);

I want to verify that each time this method is called (no matter where in my service), the param1 value is specific (e.g. only String1, String2 and String3 would be a valid parameter value for that.

Is there any technology/library/tool for that to verify this for instance in a unit test?

Aucun commentaire:

Enregistrer un commentaire