public void DeletingBatchOperatorAtIdResultsInRepositoryThatIsOneLess()
        {
            int targetCollectionId = 0;
            int beforeDeleteCount  = 1;
            int afterDeleteCount   = beforeDeleteCount - 1;

            operatorSource.SaveOperator(helper.GetUnsavedJaneDoeOperator());
            Assert.AreEqual(beforeDeleteCount, operatorSource.OperatorRepository.Count);

            int targetId = operatorSource.BatchOperatorIdMappings[targetCollectionId];

            operatorSource.DeleteBatchOperator(targetId);

            Assert.AreEqual(afterDeleteCount, operatorSource.OperatorRepository.Count);
        }
Пример #2
0
        public void RemoveSelectedBatchOperator()
        {
            int targetId = operatorSource.BatchOperatorIdMappings[SelectedBatchOperatorFromListBoxIndex];

            operatorSource.DeleteBatchOperator(targetId);
            ResetBatchOperator();
            SelectedBatchOperatorFromComboBoxIndex = -1;
            NotifyPropertyChanged("OperatorNames");
            NotifyPropertyChanged("OperatorRepository");
        }