none
Test Driven Development for WebServices (Using VS 2005 Team Edition) - ADO.Net Approach RRS feed

  • Question

  •  Hi Everyone,
     Currently I am doing Test Driven Development in C# . Here I am using the TRANSACTION APPROACH to maintain constant data for each test case.  So what I am doing now is

    // This is the pseudocode

    OPEN CONNECTION GLOBAL TO ALL UNIT TESTS and Open transaction for each unit test and rollback the same after each unit test.

    Begin C# Transaction (ADO.Net Transaction on the SqlConnection Object)
     {
        UnitTest 1  --> using Visual Studio 2005 Team Edition for Software Developers
    }
    RollBack C# Transaction

    ......................................................

    Begin C# Transaction (ADO.Net Transaction on the SqlConnection Object)
     {
        UnitTest 2  -->
    using Visual Studio 2005 Team Edition for Software Developers
    }
    RollBack C# Transaction

    etc..

    Now for doing TDD Approach for WebServices, I wanted to know how it can be accomplished. Would it be wise to open a transaction for each WebService's  WebMethod and rollback transaction at the end of that particular unit test.  If anyone has implemented TDD Approach for WebServices, can you post some links here or some code which shows how to implement the same.

    Thanks in  Advance.
    Tuesday, January 6, 2009 3:28 PM