locked
DBUnit Testing andCustom Test Condition RRS feed

  • Question

  • Assmbly: DBUnitTest, Target Framework:.NET Framework, Output type: Class Library.

    When trying to add custom test conditions, I get an error message "The designer must create an instance of type 'Microsoft.Data.Schema.UnitTesting.Conditions.TestCondition' but it cannot because the type is declared as abstract"

    I am trying to mimic the sample code given in MSDN to create a custom condition. All references are in place.

    Here is the code that I am using Please advise.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Data.Common;
    using Microsoft.Data.Schema.UnitTesting;
    using Microsoft.Data.Schema.UnitTesting.Conditions;
    using Microsoft.Data.Schema.Extensibility;
    using System.ComponentModel;
    
    
    namespace DBUnitTest1
    {
        public class DataSet : TestCondition
        {
            public bool DataSetComp()
            {
                // int compareResult = -1;
    
                string qry1 = "2,1990,Napa Ct.,NULL,Bothell,79,98011";
                string qry2 = "2,1990,Napa Ct.,NULL,Bothell,79,98011";
                bool compareResult = qry1.Equals(qry2, StringComparison.OrdinalIgnoreCase);
                return compareResult;
    
           }      
    
           
        }
    }
    

     

     

    • Moved by SamAgain Tuesday, April 13, 2010 10:31 AM (From:.NET Base Class Library)
    Friday, April 2, 2010 11:38 PM

Answers