public void Should_be_possible_to_generate_line_item()
        {
            var fakeLineObject = CreateLineObject();
            var itemTypeGenerator = new LineItemTypeGenerator();

            var generatedItems = itemTypeGenerator.GetItemsToCollect(fakeLineObject, null);

            ItemTypeChecker.DoBasicAssertForItems(generatedItems, 1, typeof(line_item));
            var lineItem = generatedItems.OfType<line_item>().Single();
            ItemTypeEntityChecker.AssertItemTypeEntity(lineItem.show_subcommand, "show running-config", "show_subcommand");
        }
        public void Should_be_possible_to_process_variables_for_line_object()
        {
            var fakeVariables = VariableHelper.CreateVariableWithOneValue("oval:modsic.tests:obj:1", "oval:modsic.tests:var:1", "show snmp");
            var fakeLineObject = this.CreateLineObjectWithVariable();

            var generatedItems = new LineItemTypeGenerator().GetItemsToCollect(fakeLineObject, fakeVariables);

            ItemTypeChecker.DoBasicAssertForItems(generatedItems, 1, typeof(line_item));
            var lineItem = generatedItems.OfType<line_item>().Single();
            ItemTypeEntityChecker.AssertItemTypeEntity(lineItem.show_subcommand, "show snmp", "show_subcommand");
        }
        public void Should_be_possible_to_process_multiple_variables_for_line_object()
        {
            var fakeLineObject = this.CreateLineObjectWithVariable();
            var fakeVariables =
                VariableHelper
                    .CreateVariableWithMultiplesValue(
                        "oval:modsic.tests:obj:1", "oval:modsic.tests:var:1", new string[] { "show snmp", "show ipconfig" });

            var generatedItems = new LineItemTypeGenerator().GetItemsToCollect(fakeLineObject, fakeVariables);

            ItemTypeChecker.DoBasicAssertForItems(generatedItems, 2, typeof(line_item));
            var lineItems = generatedItems.OfType<line_item>();
            ItemTypeEntityChecker.AssertItemTypeEntity(lineItems.ElementAt(0).show_subcommand, "show snmp", "show_subcommand");
            ItemTypeEntityChecker.AssertItemTypeEntity(lineItems.ElementAt(1).show_subcommand, "show ipconfig", "show_subcommand");
        }