Testing network inaccessibility on Windows Phone 7

I am developing an application that connects to my web server. During development, I have a web server and phone emulator on the same machine.

How can I check how the application works when there is no network connection? Are there any test hooks on the emulator? Should I use Fiddler for fake timeouts? I do not see any test hooks in the call to GetIsNetworkAvailable () ...

Thank,

+3
source share
2 answers

The approach I used is to wrap the appropriate methods in my own NetworkService class, this allows me to disable code using the Stub version during unit tests and integration tests on the emulator.

0

NetworkInterface.NetworkInterfaceType , , -. "", -. ( , , , , MobileBroadbandGSM)

NetworkInterfaceType

0

Source: https://habr.com/ru/post/1793178/


All Articles