public void Save_should_return_error_if_operation_name_is_empty() { var controller = new OperationController(null, MappingEngineBuilder.Build(), null, null, null); controller.Save(new OperationDto()); Assert.That(controller.ViewData.ModelState.IsValid, Is.False); }
protected override void SetUp() { base.SetUp(); _targetController = ServiceLocator.Current.GetInstance<OperationController>(); }
public void Save_should_throw_with_null_input() { var controller = new OperationController(null, null, null, null, null); Assert.Throws<ArgumentNullException>(() => controller.Save(null)); }