[Test]
public void OnActionExecuting_Always_Call_CheckStatisticActionAuthorization()
{
//Arrange
var _ActionExecutingContext = GetActionExecutingContext();
var _StatisticController = MockRepository.GenerateStub<StatisticsController>();
_StatisticController.DataContext = fDataContext;
//Act
_StatisticController.OnActionExecuting(_ActionExecutingContext, false);
//Assert
_StatisticController.AssertWasCalled(aStatisticController =>
aStatisticController.CheckStatisticActionAuthorization(_ActionExecutingContext));
}
Я получаю исключение NullReferenceException от CheckStatisticActionAuthorization. StatisticController.DataContext имеет значение null.В чем проблема?Благодаря.