public void Should_be_possible_to_generate_items_to_collect_from_a_sql57_object() { var fakeObject = ProbeHelper.GetDefinitionObjectTypeByID("definitionsSimple", "5100"); var itemsToCollect = new Sql57ItemTypeGenerator().GetItemsToCollect(fakeObject, null); Assert.IsNotNull(itemsToCollect); ItemTypeChecker.DoBasicAssertForItems(itemsToCollect.ToArray(), 1, typeof(sql57_item)); AssertSql57Item((sql57_item)itemsToCollect.Single()); }
public void Should_be_possible_to_generate_items_to_collect_from_a_sql57_object_with_referenced_variable_on_engine_entity() { var fakeVariables = VariableHelper.CreateVariableWithOneValue("5110", "5010", "oracle"); var fakeObject = ProbeHelper.GetDefinitionObjectTypeByID("definitionsSimple", "5110"); var itemsToCollect = new Sql57ItemTypeGenerator().GetItemsToCollect(fakeObject, fakeVariables); AssertSql57Item((sql57_item)itemsToCollect.Single()); }
public void Should_be_possible_to_generate_items_to_collect_from_a_sql57_object_with_referenced_variable_in_all_entities() { var fakeVariables = VariableHelper.CreateEvaluatedVariables("oval:modulo:obj:5150", this.FakeVariableWithSingleValues); var fakeObject = ProbeHelper.GetDefinitionObjectTypeByID("definitionsSimple", "5150"); var itemsToCollect = new Sql57ItemTypeGenerator().GetItemsToCollect(fakeObject, fakeVariables); Assert.AreEqual(1, itemsToCollect.Count()); AssertSql57Item((sql57_item)itemsToCollect.Single(), "postgres", "8", FAKE_CONNECTION_STRING2, FAKE_SQL_QUERY2); }