草庐IT

SessionRelease

全部标签

unit-testing - 如何定义模拟方法被调用零次

我正在尝试测试以下方法://AuthenticationMiddlewareMiddlewarewhichhandlesalloftheauthentication.funcAuthenticationMiddleware(contextcontext.ContextIntf,wweb.ResponseWriter,r*web.Request,nextweb.NextMiddlewareFunc){//Checkifurlisonethatdoesn'tneedauthorization.Ifnotthansendthemtotheloginpage.for_,url:=rangeAu