danmurphy
08/12/2022, 2:36 AMaliaspooryorik
makePublic( object, "myMethod" )
https://testbox.ortusbooks.com/primers/testbox-xunit-primer/spies-and-mockingaliaspooryorik
Adam Cameron
makePublic
to test it directly, as @aliaspooryorik suggests. But also stop to think that your feature might be sub-optimally written if that is the case.Adam Cameron
danmurphy
08/12/2022, 5:19 PMdanmurphy
08/12/2022, 5:24 PMdanmurphy
08/12/2022, 5:24 PMaliaspooryorik
danmurphy
08/12/2022, 5:30 PMaliaspooryorik
aliaspooryorik
danmurphy
08/12/2022, 5:34 PMAdam Cameron
wanted to just test that I get the right URL builtLegit. But it sounds to me like the logic that builds the URL might be tightly coupled to the code that uses the URL, thus making the url-building trickier to test that it ought to be. However obvs we don't always have time to refactor stuff so that it's nicely decoupled, so legit. Best to have a less-than-perfect testing approach and still have the test, than not have the test at all. So: good work!
danmurphy
08/12/2022, 6:15 PM