Example #1
0
        public void ShouldLoadTextFile()
        {
            var ops = OperationLoader.LoadOperations("test.txt");

            Assert.That(ops, Is.Not.Empty);
            Assert.That(ops.Count, Is.EqualTo(6));
        }
Example #2
0
        private void LoadRoleActionsIntoTreeNode(TreeNode aTreeNode)
        {
            string currentRole;

            if (RolesComboBox.SelectedItem == null)
            {
                currentRole = RolesComboBox.Items[0].ToString();
            }
            else
            {
                currentRole = GetSelectedRole();
            }
            List <string> operationsList = AzManReader.ReadOperationsRole(GetSelectedApplication(), currentRole);

            if (operationsList != null)
            {
                OperationLoader.LoadIntoTreeNode(aTreeNode, operationsList);
            }
            List <string> allTreeOperations = TreeViewToOperationsListTranslator.GetAllNodeOperations(GetRootNode());

            duplicateKeys = allTreeOperations.GroupBy(x => x).Where(group => group.Count() > 1).Select(group => group.Key).ToList();
        }