Unit Testing Monotouch under Visual Studio -


i have monotouch ios application i'm writing in visual studio using xamarin's new visual-studio plug-in.

i way execute unit tests within visual studio (e.g. resharper runner).

i don't care unit testing tool used (they're written nunit tests).

i know xamarin supports touch.unit allow me run on device or simulator, long of cycle-time, need run on windows machine.

i tried use nunitlite, still has problem of not being able run on windows machine.

i attempted use visual studio solution configurations, should, theoretically allow me choose different build configuration in drop-down switch between windows (for cross-platform core library + tests) , monotouch (for ios ui app, cross-platform library, , ios tests), in this, project references didn't automatically switch other framework, or messed how setup secondary build configuration.

finally, using 2 different solution files , separate sets of project files not ideal because 1 needs switch , keep clone project's files in sync.

any ideas on best way accomplish easy, fast, unit testing?

the way i've made work in past is:

  1. have core code in regular .net 4 library. library has no dependencies on ios or android.
  2. write tests against core library in .net 4 project, using nunit lite syntax in asserts. use resharper run them like.
  3. if wish, setup ios project run tests in simulator - link-in files tests

on ios or android, need link-in files core project.

if have platform-specific code in tests, won't able run them resharper.

if want see example, took same approach xamarin's field service app.


Comments