public void is_index_returns_model_type_of_iqueryable_foo() { //Arrange //Create the controller instance FooController fooController = new FooController(fooRepo); //Act var indexModel = fooController.Index().Model; //Assert Assert.IsInstanceOfType(indexModel, typeof(IQueryable<Foo>)); }
public void is_index_returns_iqueryable_foo_count_of_4() { //Arrange //Create the controller instance FooController fooController = new FooController(fooRepo); //Act var indexModel = (IQueryable<object>)fooController.Index().Model; //Assert Assert.AreEqual<int>(4, indexModel.Count()); }