Ejemplo n.º 1
0
        public void Should_be_to_generate_metabase_items_from_an_object_with_variable_with_multiple_values_in_key_entity()
        {
            var fakeOvalMetabaseObject = (metabase_object)ProbeHelper.GetOvalComponentByOvalID(FakeOvalDefinitions, "6005");

            var itemsToCollect = new MetabaseItemTypeGenerator().GetItemsToCollect(fakeOvalMetabaseObject, FakeEvaluatedVariables);

            Assert.AreEqual(2, itemsToCollect.Count());
        }
Ejemplo n.º 2
0
        public void Should_be_to_generate_metabase_items_from_an_object_with_variable_in_id_and_key_entities()
        {
            var fakeOvalMetabaseObject = (metabase_object)ProbeHelper.GetOvalComponentByOvalID(FakeOvalDefinitions, "6004");

            var itemsToCollect = new MetabaseItemTypeGenerator().GetItemsToCollect(fakeOvalMetabaseObject, FakeEvaluatedVariables);

            Assert.AreEqual(1, itemsToCollect.Count());
            var metabaseItem = ((metabase_item)itemsToCollect.ElementAt(0));

            AssertMetabaseEntity(metabaseItem.key, @"c:\temp");
            AssertMetabaseEntity(metabaseItem.id1, "9");
        }
Ejemplo n.º 3
0
        public void Should_be_to_generate_metabase_items_from_an_simple_object()
        {
            var fakeOvalMetabaseObject = ProbeHelper.GetOvalComponentByOvalID(FakeOvalDefinitions, "6000");

            var itemsToCollect = new MetabaseItemTypeGenerator().GetItemsToCollect(fakeOvalMetabaseObject, null);

            Assert.IsNotNull(itemsToCollect);
            Assert.AreEqual(1, itemsToCollect.Count());
            Assert.IsInstanceOfType(itemsToCollect.ElementAt(0), typeof(metabase_item));
            var itemToAssert = (metabase_item)itemsToCollect.ElementAt(0);

            AssertMetabaseEntity(itemToAssert.id1, "6030");
            AssertMetabaseEntity(itemToAssert.key, "W3SVC");
        }
Ejemplo n.º 4
0
        public void Should_be_to_generate_metabase_items_from_an_object_with_multiple_variables_in_id_entity()
        {
            var fakeOvalMetabaseObject = (metabase_object)ProbeHelper.GetOvalComponentByOvalID(FakeOvalDefinitions, "6003");

            var itemsToCollect = new MetabaseItemTypeGenerator().GetItemsToCollect(fakeOvalMetabaseObject, FakeEvaluatedVariables);

            Assert.AreEqual(3, itemsToCollect.Count());
            var firstItem  = (metabase_item)itemsToCollect.ElementAt(0);
            var secondItem = (metabase_item)itemsToCollect.ElementAt(1);
            var thirdItem  = (metabase_item)itemsToCollect.ElementAt(2);

            AssertMetabaseEntity(firstItem.id1, "1000");
            AssertMetabaseEntity(secondItem.id1, "1001");
            AssertMetabaseEntity(thirdItem.id1, "1002");
        }