unit testing system.timers.timer

后端 未结 2 1605
情书的邮戳
情书的邮戳 2020-12-15 23:10

I\'ve been reading over the questions about unit testing with timers and threading. I found the SO question about unit testing system.threading.timers, but I need to unit t

2条回答
  •  臣服心动
    2020-12-15 23:32

    You need to test the timer or test the code executed in each event? If so, you can put that logic in another class and just test that. You can trust the timer will call it...

提交回复
热议问题