草庐IT

isTokenValid

全部标签

go - 测试中的模拟方法

我有一个要测试的类:typeApiGatewaystruct{usernamestringpasswordstringscsClient*scsClient.APIDocumentationauthAuth}typeAuthstruct{tokenstringvalidToint32}funcNew(hoststring,schemestring,usernamestring,passwordstring)*ApiGateway{varconfig=scsClient.TransportConfig{host,"/",[]string{scheme}}varclient=scsClie