public void ExportTest() { PartialViewResult rv = (PartialViewResult)_controller.Index(); Assert.IsInstanceOfType(rv.Model, typeof(IBasePagedListVM <TopBasePoco, BaseSearcher>)); IActionResult rv2 = _controller.ExportExcel(rv.Model as PlayerStateListVM); Assert.IsTrue((rv2 as FileContentResult).FileContents.Length > 0); }