locked
How to perform Unit Testing of a Dataset under Unit Testing Framework of VS 2008 RRS feed

  • Question

  • Hi,
    I am using VS 2008 and exploring the possibilities with Unit Testing Framework of VS 2008.
    I created a method which returns an integer value and tested this against the unit testing framework of VS 2008 and it worked and did it for a string value and it worked too, but there is a case where the return type is a Dataset ..
    How would I test it in that case ?
    For ex :
    Dataset Actual = a dataset
    Dataset Expected = ?

    Do I need to build the dataset programmatically of what the result could be, even if the actual dataset has 1000 records ?

    Thanks,
    Monday, May 18, 2009 9:09 AM

Answers

  • Hi Roshan,

    If you build code to create the dataset for comparison in testing, how are you going to ensure the correctness of that code without unit testing it?
    I think if you know your test data quite well, then you should be able to compare some properties of the dataset as the table names, number of rows in the tables etc. These should be available without any coding!
    VP, Technology, SEED Infotech Ltd.
    • Marked as answer by Bill.Wang Monday, May 25, 2009 5:26 AM
    Monday, May 18, 2009 12:31 PM