public void Can_Create_Categories() { var mock = new UnitTest().CareaData(); var controller = new NavController(mock.Object); var result = (IEnumerable<string>)controller.Menu(null).Model; var array = result.ToArray(); Assert.IsTrue(array.Length == 5); }
public void Indicates_Selected_Category() { var mock = new UnitTest().CareaData(); var controller = new NavController(mock.Object); var result = (string)controller.Menu("OMG").ViewBag.SelectedCategory; Assert.AreEqual("OMG", result); }