public SubscriptionControllerTest() { DB = new InMemoryDB(); context = DB.GetInMemoryDB(true); SeederInMemoryDB.Seed(context); c = new SubscriptionController(context); }
public RecipesControllerTest() { DB = new InMemoryDB(); context = DB.GetInMemoryDB(true); SeederInMemoryDB.Seed(context); rc = new RecipesController(context); }
public ProductsControllerTest() { DB = new InMemoryDB(); context = DB.GetInMemoryDB(true); SeederInMemoryDB.Seed(context); c = new ProductsController(context); }
public void TestGetSelectedCats() { //Test #1 int i = context.Normal_Categories.ToList()[0].CategoryID; string[] array = new string[] { "C " + i }; var result = c.GetCategories(array); Assert.Equal(i, result.ToList()[0].CategoryID); //Test #2 context = DB.GetInMemoryDB(true); array = new string[] { "SKJHGD" }; var result1 = c.GetCategories(array); Assert.Empty(result1.ToList()); }