mardi 3 mars 2015

Unit testing application variables in asp.net mvc

Hi I am having trouble unit testing my application that use application variables. Below is my test method. accController.Clist(cIn) calls methods that use application variables that are read in from the global.asax file. How and where do I declare it so that the application variables are actually used.



[TestMethod]
public void TestGetCompanyList()
{
var accController = new AccSerController();
CInt cInt = new CInt();
cIn.Iss = "Other";
cIn.Tick = "BK";
var result
= accController.Clist(cIn) as IEnumerable<CList>;
Assert.IsNotNull(result);
}

Aucun commentaire:

Enregistrer un commentaire