public async Task IndexReturnTypeTest() { var optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>(); optionsBuilder.UseInMemoryDatabase(databaseName: "db1"); var _dbContext = new ApplicationDbContext(optionsBuilder.Options); var controller = new BudgetsController(_dbContext); var result = await controller.Index(); Assert.IsType <ViewResult>(result); }