Did you successfully run unit tests for your Monotouch project? I read other posts asking people to manually add links to related assemblies. Doing this makes the project compile, but it still won’t run the tests.
I have a solution with two projects; Monotouch navigation project and NUnit library project. I added a link to my monotouch project and to monotouch and other necessary assemblies for a test project. Tests that run only code outside the monotouch assembly will work fine, those that access the mono code will fail:
System.IO.IOException: write failure ---> System.Net.Sockets.SocketException: socket is disabled in System.Net.Sockets.Socket.Send (System.Byte [] buf, Int32 offset, Int32 size, SocketFlags flags) [ 0x00000] at: 0 in System.Net.Sockets.NetworkStream.Write (buffer System.Byte [], offset Int32, size Int32) [0x00000] at: 0 --- End of internal check of the exception stack --- in System.Net .Sockets.NetworkStream.Write (buffer System.Byte [], offset Int32, size Int32) [0x00000] at: 0 at System.IO.BufferedStream.Flush () [0x00000] at: 0 at (wrapper remoting-invoke-with -check) System.IO.BufferedStream: Flush () in System.IO.BufferedStream.Dispose (Boolean disposing) [0x00000] at: 0 in System.IO.Stream.Close () [0x00000] at: 0 in Mono.Remoting .Channels.Unix.ClientConnection.ProcessMessages () [0x00000] at: 0
I found the message : "If you are not working on the iPhone or in the iPhone simulator, you cannot call the necessary built-in APIs to instantiate the components."
So I really wonder if it is really possible to do unit testing in Monotouch at the moment, and if not, what are all the other guys doing?
Thank!
source
share