I am using Visual Studio 2012 and I get the following error: "Error" hw02.World "does not contain a constructor that takes 2 arguments. I am trying to create a unit test for my class:
class World : IWorld
{
public World(int width, int height)
{
Width = width;
Height = height;
world = new IBuilding[width, height];
}
}
Test that creates an error:
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var world = new World(5, 5);
}
}
Thanks for any help
source
share