mercredi 6 avril 2016

inject/create viewmodel object in BDD test project

we are doing behavior driven development of a WPF application. To write BDD test case i need to instantiate few of my viewModel object in the test project.

  1. Is it wise to use mocking in BDD test cases? if yes then till what extant? and then how it would differ from unit test case.

2.I am using unity injection(construction) for creation of View models in my WPF application. How can i get these ViewModel objects in my bDD test project? a) Mocking b) creating unityContainer instance and then resolve by interface name c) Bootstrapper or anything else for getting the ViewModel object I can think of these 3 approaches only but not sure how feasible the implementation of these option

  1. my WPF app is using some WCF service also how to get the object of this as well in my test project? creating a seperate instance in test project or must use the the instance which i have injected in my WPF service.

here the point number 2 is most important for me.

Aucun commentaire:

Enregistrer un commentaire