public void Should_be_possible_to_handle_empty_command_output() { var objectCollector = new LineObjectCollector(CreateTelnetConnectionMock(true)); var fakeLineItem = new line_item() { show_subcommand = OvalHelper.CreateItemEntityWithStringValue(FAKE_LINE_COMMAND) }; var collectedItems = objectCollector.CollectDataForSystemItem(fakeLineItem); ItemTypeChecker.DoBasicAssertForCollectedItems(collectedItems.ToArray(), 1, typeof(line_item), false); Assert.AreEqual(StatusEnumeration.doesnotexist, collectedItems.Single().ItemType.status, "The expected item status is 'does not exist'"); }
public void Should_be_possible_to_collect_a_line_item() { var objectCollector = new LineObjectCollector(CreateTelnetConnectionMock()); var fakeLineItem = new line_item() { show_subcommand = OvalHelper.CreateItemEntityWithStringValue(FAKE_LINE_COMMAND) }; var collectedItems = objectCollector.CollectDataForSystemItem(fakeLineItem); ItemTypeChecker.DoBasicAssertForCollectedItems(collectedItems.ToArray(), 1, typeof(line_item)); var collectedLineItem = (line_item)collectedItems.Single().ItemType; ItemTypeEntityChecker.AssertItemTypeEntity(collectedLineItem.config_line, FAKE_RETURN, "config_line"); }