public OperationBlock(IList<MergeField> mergeFields, NotificationApplication notification, TechnologyEmployed technologyEmployed) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new OperationViewModel(notification, technologyEmployed, new OperationInfoFormatter()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public void SetsAnnexProvided(bool isAnnexProvided) { technologyEmployed.AnnexProvided = isAnnexProvided; var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(isAnnexProvided, model.IsAnnexProvided); }
public void SetsReasonForExportWhereNullToEmptyString() { notification.ReasonForExport = null; var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(string.Empty, model.ReasonForExport); }
public void SetsAllFieldsToEmptyStringOrFalseWhereNotificationIsNull() { var model = new OperationViewModel(null, null, formatter); Assert.Equal(string.Empty, model.AnnexProvided); Assert.Equal(string.Empty, model.FurtherDetails); Assert.Equal(string.Empty, model.TechnologyEmployedDetails); Assert.Equal(string.Empty, model.ReasonForExport); Assert.Equal(string.Empty, model.OperationCodes); Assert.False(model.IsAnnexProvided); }
public void SetsTechnologyEmployedDetailsWhereGivenAsNullToEmptyString() { technologyEmployed.Details = null; var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(string.Empty, model.TechnologyEmployedDetails); }
public void SetsTechnologyEmployedDetailsWhereGiven() { var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(technologyEmployed.Details, model.TechnologyEmployedDetails); }
public void SetsReasonForExportWhereGiven() { var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(notification.ReasonForExport, model.ReasonForExport); }
public void SetsFurtherDetailsEmptyStringWhereTechnologyEmployedIsNull() { var model = new OperationViewModel(notification, null, formatter); Assert.Equal(string.Empty, model.FurtherDetails); }
public void SetsAnnexProvidedToEmptyString() { var model = new OperationViewModel(notification, technologyEmployed, formatter); Assert.Equal(string.Empty, model.AnnexProvided); }
public void RegisterOperation(IOperation operation) { var operationViewModel = new OperationViewModel(eventAggregator); operationViewModel.Load(operation); registeredOperations.Add(operationViewModel); }
/// <summary> /// /// </summary> /// <param name="vm"></param> public OperationWindow(OperationViewModel vm) { DataContext = vm; InitializeComponent(); }
public ActionResult Index() { var model = new OperationViewModel(OperationsList); return(View(model)); }
public RemoveOperationFromScriptCommand(OperationViewModel operationViewModel, ScriptOperationsViewModel scriptOperationsViewModel) { _operationViewModel = operationViewModel; _scriptOperationsViewModel = scriptOperationsViewModel; }
public OperationsPage() { InitializeComponent(); BindingContext = new OperationViewModel(); }