How to use Microsoft Fakes for unit testing a web service? -


i working on project has 3 tier architecture:- 1. business layer 2. data layer 3. service layer

i want unit test service layer.

currently succeeded add unit test business layer faking data layer.

now issue is, have service layer makes call business layer, in turn makes calls data layer.

initial test case passed written adding reference of business layer project in unit test project , creating fakes of data layer.

now want is, want achieve adding reference of service in unit test project , using microsoft fakes @ same time.

can please me in understanding this? new fakes framework.

this question old, helps you, or in search:

you seem (imho)to mixing needed in architecture(and/or integration testing) vs needed in unit testing. if trying fake unit testing, remember sut! system under test should component testing. in case, if testing component in service layer should fake(shim or stub) calls external.

http://msdn.microsoft.com/en-us/library/hh549175.aspx gives example istockfeed stub.

please clarify if trying integration test or unit test.


Comments