0

This simple generated unit test calls a controller

  [TestMethod()]
    [HostType("ASP.NET")]
    [AspNetDevelopmentServerHost("E:\\Backup\\Proyecto", "/Proyecto")]
    [UrlToTest("http://localhost:40053/Proyecto/")]
    public void BatchUpdateTest()
    {
        FacturaController target = new FacturaController(); // TODO: Initialize to an appropriate value
        Factura Factura = null; // TODO: Initialize to an appropriate value
        JsonResult expected = null; // TODO: Initialize to an appropriate value
        JsonResult actual;
        actual = target.BatchUpdate(Factura);
        Assert.AreEqual(expected, actual);
        Assert.Inconclusive("Verify the correctness of this test method.");
    }

but throws me this error:

"Could not connect to the Web server for page 'localhost:40053/Proyecto'. Too many automatic redirections were attempted.. Check that the Web server is running and visible on the network and that the page specified exists."

I can connect to the integrated web server with the browser of the Visual Studio

Related to this but couldnt help me: "too many automatic redirections were attempted" error message when using a httpWebRequest in .NET.

Am I supposed to save cookies somehow?

Community
  • 1
  • 1
nano
  • 1
  • 1
  • 2
  • What is your question? Can you give a little more context, the steps you take to reach this behavior and what you expect it to do? A little code for the parts involved would also help us diagnose whatever your problem is. – Nick Larsen Feb 15 '13 at 14:22

1 Answers1

0

Just removed the modificators after the TestMethod declaration and it worked:

[TestMethod()]
public void BatchUpdateTest()
{
...
}
nano
  • 1
  • 1
  • 2