public void Invalid001c()
        {
            #region graph
            /**
             *                  +--------+                              +--------+
             *      +---------->|ServiceA+-------+   *----------------->|ServiceB|
             *      |           |Optional|       |   | Need Running     |Disable |
             *      |           +---+----+       |   |                  +---+----+
             *      |               |            |   |                      |
             *      |               |            |   |                      |
             *      |               |            |   |                      |
             *  +---+-----+         |        +---+---*-+                    |
             *  |ServiceAx|     +---+-----+  |PluginA-2|                +---+-----+
             *  |Optional |     |PluginA-1|  |Running  |                |PluginB-1|
             *  +----+----+     |Optional |  +---------+                |Optional |
             *       |          +---------+                             +---------+
             *       |
             *  +----+-----+
             *  |PluginAx-1|
             *  |Optional  |
             *  +----------+
             */
            #endregion

            DiscoveredInfo info = MockInfoFactory.CreateGraph001();
            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( info );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "ServiceB", ConfigurationStatus.Disabled );
            cl.Items.Add( "PluginA-2", ConfigurationStatus.Running );

            engine.FullStaticResolutionOnly( res =>
            {
                res.CheckAllBlockingPluginsAre( "PluginA-2" );
                res.CheckNoBlockingServices();
            } );
        }
        public void InvalidCommonReferences2()
        {
            #region graph
            /*
            *                  +--------+                            +--------+
            *      +-----------|Service1+                            |Service2|---------------+                  +---------------+
            *      |           |Running |                            |Running |               |                  |AnotherBlocking+
            *      |           +---+----+                            +---+----+               |                  |    Runnable   |
            *      |               |                                      |                   |                  +-------+-------+
            *      |               |                                      |                   |                          |
            *      |               |                                      |                   |                          |
            *  +---+-----+         |                                      |                   |                          |
            *  |Plugin1  |     +---+-----+                            +---+-----+         +---+-----+                    |
            *  |Optional |     |Plugin2  |                            |Plugin3  |         |Plugin4  |            +-------+-------------+
            *  +----+----+     |Optional |                            |Optional |         |Optional |            |DisabledForBlocking  |
            *       |          +---------+                            +---------+         +-----+---+            |     Disabled        |
            *       |                   |                                 |                     |                +---------------------+
            *       |                   |                                 |                     |
            *       |                   |                                 |                     |
            *       |                   |                                 |                     |
            *       |                   |                                 |                     |
             *      |                   |                                 |                     |
            *       |                   |                                 |                     |
            *       |                   |           +--------+            |                     |
            *       |                   |           |Service3+            |                     |
            *       |       +-----------|-----------|Optional|------------|------+--------------+-----------+
            *       |       |           |           +---+----+            |      |              |           |
            *       |       |           |               |                 |      |              |           |
            *       |       |           |               |                 |      |              |           |
            *       |   +---+-------+   +-------->+-----+-----+           |  +---+-------+      |       +---+-------+
            *       |   |Service3.1 |             |Service3.2 |           |  |Service3.3 |      |       |Service3.4 |
            *       +-->|Optional   |             |Optional   |           +->|Optional   |      +------>|Optional   |
            *           +-----------+             +-----------+              +-----------+              +-----------+
            *           |           |             |           |              |           |              |           |
            *           |           |             |           |              |           |              |           |
            *           |           |             |           |              |           |              |           |
            *       +---+-----+ +---+-----+   +---+-----+ +---+-----+    +---+-----+ +---+-----+    +---+-----+ +---+-----+
            *       |Plugin5  | |Plugin6  |   |Plugin7  | |Plugin8  |    |Plugin9  | |Plugin10 |    |Plugin11 | |Plugin12 |
            *       |Optional | |Optional |   |Optional | |Optional |    |Optional | |Optional |    |Optional | |Optional |
            *       +---------+ +---------+   +---------+ +---------+    +---------+ +---------+    +---------+ +---------+
            *
            */
            #endregion
            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            var disco = MockInfoFactory.CreateGraph005b();
            var anotherBlocking = new ServiceInfo( "AnotherBlocking", disco.DefaultAssembly );
            var disabledForBlocking = new PluginInfo( "DisabledForBlocking", disco.DefaultAssembly );
            disabledForBlocking.Service = anotherBlocking;
            disco.ServiceInfos.Add( anotherBlocking );
            disco.PluginInfos.Add( disabledForBlocking );
            engine.SetDiscoveredInfo( disco );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "Service1", ConfigurationStatus.Running );
            cl.Items.Add( "Service2", ConfigurationStatus.Running );
            cl.Items.Add( "AnotherBlocking", ConfigurationStatus.Runnable );
            cl.Items.Add( "DisabledForBlocking", ConfigurationStatus.Disabled );

            engine.FullStaticResolutionOnly( res =>
               {
                   res.CheckAllBlockingServicesAre( "Service1 | Service2, AnotherBlocking" );
                   res.CheckNoBlockingPlugins();
               } );
        }
        public void InvalidCommonReferences1()
        {
            #region graph
                /*
                *                  +--------+                            +--------+
                *      +-----------|Service1+                            |Service2|---------------+
                *      |           |Running |                            |Running |               |
                *      |           +---+----+                            +---+----+               |
                *      |               |                                      |                   |
                *      |               |                                      |                   |
                *      |               |                                      |                   |
                *  +---+-----+         |                                      |                   |
                *  |Plugin1  |     +---+-----+                            +---+-----+         +---+-----+
                *  |Optional |     |Plugin2  |                            |Plugin3  |         |Plugin4  |
                *  +----+----+     |Optional |                            |Optional |         |Optional |
                *       |          +---------+                            +---------+         +-----+---+
                *       |                   |                                 |                     |
                *       |                   |                                 |                     |
                *       |                   |                                 |                     |
                *       |                   |                                 |                     |
                *       |                   |                                 |                     |
                 *      |                   |                                 |                     |
                *       |                   |                                 |                     |
                *       |                   |           +--------+            |                     |
                *       |                   |           |Service3+            |                     |
                *       |       +-----------|-----------|Optional|------------|------+--------------+-----------+
                *       |       |           |           +---+----+            |      |              |           |
                *       |       |           |               |                 |      |              |           |
                *       |       |           |               |                 |      |              |           |
                *       |   +---+-------+   +-------->+-----+-----+           |  +---+-------+      |       +---+-------+
                *       |   |Service3.1 |             |Service3.2 |           |  |Service3.3 |      |       |Service3.4 |
                *       +-->|Optional   |             |Optional   |           +->|Optional   |<-----+       |Optional   |
                 *          +-----------+             +-----------+              +-----------+              +-----------+
                 *          |           |             |           |              |           |              |           |
                 *          |           |             |           |              |           |              |           |
                 *          |           |             |           |              |           |              |           |
                 *      +---+-----+ +---+-----+   +---+-----+ +---+-----+    +---+-----+ +---+-----+    +---+-----+ +---+-----+
                 *      |Plugin5  | |Plugin6  |   |Plugin7  | |Plugin8  |    |Plugin9  | |Plugin10 |    |Plugin11 | |Plugin12 |
                 *      |Optional | |Optional |   |Optional | |Optional |    |Optional | |Optional |    |Optional | |Optional |
                 *      +---------+ +---------+   +---------+ +---------+    +---------+ +---------+    +---------+ +---------+
                 *
                */
            #endregion
            DiscoveredInfo info = MockInfoFactory.CreateGraph005();
            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( info );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "Service1", ConfigurationStatus.Running );
            cl.Items.Add( "Service2", ConfigurationStatus.Running );

            engine.FullStaticResolutionOnly( res =>
               {
                   res.CheckAllBlockingServicesAre( "Service1 | Service2" );
                   res.CheckNoBlockingPlugins();
               } );
        }
        public void Invalid004b()
        {
            #region graph
            /**
             *  +--------+
             *  |ServiceA+ ------+
             *  |Running |       |
             *  +---+----+       |
             *      |            |
             *      |            |
             *      |            |
             *      |         +---+------+
             *  +---+------+  |ServiceAx2|
             *  |ServiceAx1|  |Running   |
             *  |Running   |  +----------+
             *  +----------+      |
             *      |             |
             *      |             |
             *      |             |
             *      |          +---+-------+
             *  +---+-------+  |PluginAx2-1|
             *  |PluginAx1-1|  |Optional   |
             *  |Optional   |  +-----------+
             *  +-----------+
             */
            #endregion

            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( MockInfoFactory.CreateGraph004() );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "ServiceA", ConfigurationStatus.Running );
            cl.Items.Add( "ServiceAx1", ConfigurationStatus.Running );
            cl.Items.Add( "ServiceAx2", ConfigurationStatus.Running );

            engine.FullStaticResolutionOnly( res =>
               {
                   res.CheckAllBlockingServicesAre( "ServiceA,ServiceAx1,ServiceAx2" );
               } );
        }
        public void Invalid003MinusPluginA2()
        {
            #region graph
            /**
             *  +--------+
             *  |ServiceA|
             *  |Disabled|
             *  +---+----+
             *      |
             *      |
             *      |
             *      |
             *  +---+-----+
             *  |PluginA-1|
             *  |Running  |
             *  +---------+
             */
            #endregion

            DiscoveredInfo info = MockInfoFactory.CreateGraph003();

            info.PluginInfos.Remove( info.FindPlugin( "PluginA-2" ) );
            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( info );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "ServiceA", ConfigurationStatus.Disabled );
            cl.Items.Add( "PluginA-1", ConfigurationStatus.Running );

            engine.FullStaticResolutionOnly( res =>
               {
                   res.CheckAllBlockingPluginsAre( "PluginA-1" );
               } );
        }
        public void Invalid003e()
        {
            #region graph
            /**
             *  +--------+
             *  |ServiceA+ ------+
             *  |Disable |       |
             *  +---+----+       |
             *      |            |
             *      |            |
             *      |            |
             *      |        +---+---*-+
             *  +---+-----+  |PluginA-2|
             *  |PluginA-1|  |Optional |
             *  |Running  |  +---------+
             *  +---------+
             */
            #endregion

            DiscoveredInfo info = MockInfoFactory.CreateGraph003();
            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( info );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "ServiceA", ConfigurationStatus.Disabled );
            cl.Items.Add( "PluginA-1", ConfigurationStatus.Running );

            engine.FullStaticResolutionOnly( res =>
                {
                    res.CheckAllBlockingPluginsAre( "PluginA-1" );
                    res.CheckWantedConfigSolvedStatusIs( "PluginA-1", SolvedConfigurationStatus.Running );
                } );
        }
        public void Invalid001MinusPluginAx()
        {
            #region graph
            /**
             *                  +--------+                              +--------+
             *      +---------->|ServiceA+-------+   *----------------->|ServiceB|
             *      |           |Runnable|       |   | Need Running     |Runnable|
             *      |           +---+----+       |   |                  +---+----+
             *      |               |            |   |                      |
             *      |               |            |   |                      |
             *      |               |            |   |                      |
             *  +---+-----+         |        +---+---*-+                    |
             *  |ServiceAx|     +---+-----+  |PluginA-2|                +---+-----+
             *  |Runnable |     |PluginA-1|  |Runnable |                |PluginB-1|
             *  +----+----+     |Runnable |  +---------+                |Runnable |
             *                  +---------+                             +---------+
             */
            #endregion

            DiscoveredInfo info = MockInfoFactory.CreateGraph001();
            info.PluginInfos.Remove( info.FindPlugin( "PluginAx-1" ) );

            YodiiEngine engine = new YodiiEngine( new YodiiEngineHostMock() );
            engine.SetDiscoveredInfo( info );

            IConfigurationLayer cl = engine.Configuration.Layers.Create();
            cl.Items.Add( "ServiceA", ConfigurationStatus.Runnable );
            cl.Items.Add( "ServiceB", ConfigurationStatus.Runnable );
            cl.Items.Add( "ServiceAx", ConfigurationStatus.Runnable );
            cl.Items.Add( "PluginA-1", ConfigurationStatus.Runnable );
            cl.Items.Add( "PluginA-2", ConfigurationStatus.Runnable );
            cl.Items.Add( "PluginB-1", ConfigurationStatus.Runnable );

            engine.FullStaticResolutionOnly( res =>
                {

                    res.CheckAllBlockingServicesAre( "ServiceAx" );
                    res.CheckNoBlockingPlugins();
                    res.CheckWantedConfigSolvedStatusIs( "PluginA-2", SolvedConfigurationStatus.Runnable );
                } );
        }