Reputation: 23
namespace TestBI
{
[TestFixture]
class ClassChild:ClassParent
{
public ClassChild(DataRow row, string name): base(row, detail) { }
[Test]
public void Test()
{
DataRow dr = new DataRow();
dr[0] = 1;
dr[1] = "ram"
ClassChild ch = new ClassChild(dr,"student");
:
:
:
Assert.AreEqual(string1,string2);
}
}
}
When I run the test,i get an error as "TestBI.ChildClass.Test suitable constructor was found"
How do i need to pass parameters here to child class?
Upvotes: 1
Views: 884
Reputation: 27103
Provide a zero argument constructor for your test class. It is fine if it calls a multiple argument constructor of the superclass, as long as it provides it with proper arguments.
Upvotes: 1