You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
testtime package provides testtime.Now() and testtime.SetTime(). testtime.SetTime() stores a fixed time to a map with goroutine ID of testtime.SetTime() as a key. When goroutine ID of testtime.Now() is related to a fixed time by testtime.SetTime(), it returns the fixed time otherwise it returns current time which is returned by time.Now(). package main import ( "fmt" "time" "testing" "github.com/t
Project status Please see the release notes page. Updates are announced via Twitter Follow @mockitojava and mailing list . Mockito downloads and instructions for setting up Maven, Gradle and other build systems are available from the Central Repository. The documentation for all versions is available on javadoc.io (the site is updated within 24 hours of the latest release). Still on Mockito 1.x? S
golangã§ãã¹ãã®ããã ãã«interfaceãæ¸ãã®ãæ»ã¬ã»ã©å«ã ã£ãã®ã§ç·¨ã¿åºããæãç´¹ä»ãã¾ãã TL;DR ãã¹ã(=mock)ã®ããã ãã«interfaceã¯åããããªã åã¨ã¤ãªã¢ã¹ã¨ãã«ãã¿ã°ãçµã¿åãããã¨interfaceããªãã¦ãã¢ãã¯ãä½ãã ãã®ææ³ã«å¿ è¦ãªã¢ãã¯ãèªåçæããããã°ã©ã ãä½ã£ã interfaceã¯æ¬å½ã«å¿ è¦ãªã·ã¼ã³ã§ä½¿ãã¹ã Background ç¾å¨ã¢ãã¯ã使ã£ãåä½ãã¹ãã¯ä¸è¬çã§ãã Javaã§ã®ä¾ãæããã¨ãã¢ãã¯ãããã³ã³ãã¼ãã³ãã«ã¤ãã¦äºãinterfaceãå®ç¾©ãã¦ãããã¢ãã¯ã§ã¯ãã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£ ããã®ãå®ç³ã§ãã ãããgolangã®interfaceã¯Javaãªã©ã®ããã¨ã¯è¥å¹²æ§è³ªãç°ãªãããããã¹ã=ã¢ãã¯ã®ããã ãã«interfaceãæ¸ãã®ã¯ãªã¼ãã¼ã¯ã¼ã¯æ°å³ã§ãã ãããã¹ãã®ããã ãã«interface
ã¯ããã¾ãã¦ï¼4/1ããSWETã«å ãã£ã@Kuniwakã§ãã ä»åã¯ãç§ãSWETã«å ¥ã£ã¦é©ãããã¨ã¨ãããã¦SWETã ããããçã¾ãããã®ã«ã¤ãã¦ã話ããã¾ãã ã¾ãKuniwakã¯ã©ããªäººï¼ éçºãé«éåããããã¹ããéçæ¤æ»ãçæ¥ã¨ãã¦ãã¾ãã主ã«ã以ä¸ã®ãããªè¨äºãã¹ã©ã¤ããæ¸ãã¦ãã¾ãã ãã¹ãããªãã£ãç¡æ³å°å¸¯ã«ãã¹ããå°å ¥ãã¦éçºé度ã1.7åã«ãã話 iOSéçºãå¹çåãããã¹ãã®ãã¶ã¤ã³ãã¿ã¼ã³ã«ã¤ã㦠Swiftã® HTTPã©ã¤ãã©ãªã§è¦ãã¾ãªãããã®èªä½APIã¯ã©ã¤ã¢ã³ãè¨è¨ â»TDDï¼ãã¹ãé§åéçºï¼ã¨ããè¨èã使ããªãã§TDDãå®è·µãã¦ããè¨äº Vim scriptéç解æã®å ã¨é ã§ã¯ããããªç§ãSWETã¨ããèªåãã¹ãã®ã¨ãã¹ãã¼ãã®ãã¼ã ã§åããã¨ã«ãªã£ã¦é©ãããã¨ãç´¹ä»ãã¾ãã SWETã«å ¥ã£ã¦é©ããã㨠SWETã«å ¥ã£ã¦é©ããã®ã¯ããã¹ãã«é¢é£ããã
At Tapjoy we have a team that focuses on optimizing our infrastructure. We've identified areas in our infrastructure that can be rewritten to reduce our cloud expenses as well as prepare our infrastructure to scale up to handle our traffic growth. Â To this end we're employing more and more Go because it's a strongly typed compiled language that is easy to learn and gives performance benefits right
ããã«ã¡ã¯ãå°éãããã§ããã¿ã¤ãã«å ¨é¨ã§ãã æ¨æ¥ãç¾å¨æå»ã«ãã£ã¦æ¡ä»¶åå²ãããã¸ãã¯ãå«ãGoããã°ã©ã ãæ¸ãã¦ãã¦ãã©ããã¹ããããå°ã£ãã®ã§ããããã¾ãï¼ã¨æãï¼ããæ¹ãæãã¤ããã®ã§ããã«æ¸ãã¦ããã¾ãã æ¸ãã¦ããã®ã¯ã¾ãã ãããããããã½ã¼ã¹ã³ã¼ãã§ãã // main.go package main import ( "fmt" "time" ) func main() { fmt.Println(Greet("ããã")) } func Greet(n string) string { t := time.Now() if 6 <= t.Hour() && t.Hour() <= 18 { return fmt.Sprintf("ããã«ã¡ã¯%sãããä»ã¯%dæã§ããï¼", n, t.Hour()) } else { return fmt.Sprintf("ããã°ãã¯%s
Go㧠net/http ã使ã£ãControllerã®ãã¹ãã«ã¯ã net/http/httptest ã¢ã¸ã¥ã¼ã«ã使ãã¨æ¬ä¼¼çã«ãµã¼ãããã®å ´ã§ç«ã¦ãç»é²ãããã³ãã©ã«ãªã¯ã¨ã¹ããéãã¾ãã ãã ãAPIã«ä½¿ãã¢ã¯ã·ã§ã³ã¯ãã³ãã³ãå¤é¨ã®APIãå©ããã¨ãããã¾ãã ãã®éããã¹ããå®è¡ããã¨ãã«å¤é¨APIã使ããªãç¶æ³(æ¬çªç°å¢ã¨ã¯éãç¶æ³ãä¾ãã°ãproductionç¨ã®APIã®çºè¡ã«ã¯ééãçºçãããªã©)ã«ééãã¾ãã Test Double ãããªã¨ãã«ç¥ããã¦ãããã¯ããã¯ã¨ãã¦ããã¹ãæã«å¤é¨APIã¸ã®ãªã¯ã¨ã¹ããDouble(Stub)ãããã¨ã§ãã ãã®å¤é¨APIãè¿å´ããã§ãããæå¾ å¤ãç»é²ãã¦ããã°æ£å¸¸ã±ã¼ã¹ããã¨ã©ã¼å¤ãç»é²ãã¦ããã°ã¨ã©ã¼ã±ã¼ã¹ããã¹ãã§ãã¾ãã ããã§ä¾ã«æããStubããæ¹æ³ã¯ã http.Client ããã¨ã«HTTPãªã¯ã¨ã¹ããããã¨ãå
About That's what Mocker is about: Graceful platform for test doubles in Python (mocks, stubs, fakes, and dummies). Inspiration from real needs, and also from pmock, jmock, pymock, easymock, etc. Expectation of expressions defined by actually using mock objects. Expressions may be replayed in any order by default, Trivial specification of ordering between expressions when wanted. Nice parameter ma
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}