Exemple #1
0
        public void TestXmlDeserialization()
        {
            YodiiEngine engineA = MockXmlUtils.CreateEngineFromXmlResource("Valid001a");
            YodiiEngine engineB = StaticConfigurationTests.CreateValid001a();

            EquivalenceExtensions.AssertEngineInfoEquivalence(engineA, engineB);

            engineA = MockXmlUtils.CreateEngineFromXmlResource("Graph005");
            var info = MockInfoFactory.CreateGraph005();

            EquivalenceExtensions.AssertDiscoveredInfoEquivalence(engineA.DiscoveredInfo, info);
        }
Exemple #2
0
        public void RuntimeAssertionTest()
        {
            IYodiiEngine engine = MockXmlUtils.CreateEngineFromXmlResource("BaseGraph4");

            engine.Start();

            var rootIService2 = engine.LiveInfo.Services.Where(s => s.FullName == "IService2").First();

            var layer  = engine.Configuration.Layers.Create("DefautLayer");
            var result = layer.Items.Add("IService2", ConfigurationStatus.Disabled);

            Assert.That(result.Success == false);
        }