How to simulate network failure for test purposes (in C#)?

前端 未结 11 808
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 04:25

I\'m building what could be called the DAL for a new app. Unfortunately, network connectivity to the database is a real problem.

I\'d like to be able to temporarily

11条回答
  •  猫巷女王i
    2020-12-29 05:20

    Probably not helpful for simulating "real" network issues, but you could just point your DB connection string to a non-existent machine while within the scope of your test.

提交回复
热议问题