Ejemplo n.º 1
0
        public void GridionStopAllTest()
        {
            GridionFactory.Start();

            Assert.AreEqual(1, GridionFactory.GetAll().Count, "Invalid instance count.");

            GridionFactory.StopAll();

            Assert.AreEqual(0, GridionFactory.GetAll().Count, "Invalid instance count.");
        }
Ejemplo n.º 2
0
        public void GridionStopAllTest()
        {
            var configuration1 = new NodeConfiguration("127.0.0.1", 24000);
            var configuration2 = new NodeConfiguration("127.0.0.1", 24001);

            using (var gridion1 = GridionFactory.Start(configuration1))
            {
                using (var gridion2 = GridionFactory.Start(configuration2))
                {
                    ((IGridionInternal)gridion1).Disposed += this.DisposedHandler;
                    ((IGridionInternal)gridion2).Disposed += this.DisposedHandler;
                    Assert.AreEqual(2, GridionFactory.GetAll().Count, "Invalid instance count.");

                    GridionFactory.StopAll();

                    Assert.AreEqual(0, GridionFactory.GetAll().Count, "Invalid instance count.");
                    Assert.AreEqual(2, this.gridionStopAllCount, "Invalid instance count.");
                }
            }
        }
Ejemplo n.º 3
0
        public void GridionStopAllTest()
        {
            GridionFactory.ResetDisposedInstanceNumber();

            var configuration1 = new GridionConfiguration("127.0.0.1", 24000);
            var configuration2 = new GridionConfiguration("127.0.0.1", 24001);

            using (GridionFactory.Start(configuration1))
            {
                using (GridionFactory.Start(configuration2))
                {
                    Assert.AreEqual(2, GridionFactory.GetAll().Count, "Invalid instance count.");

                    GridionFactory.StopAll();

                    Assert.AreEqual(0, GridionFactory.GetAll().Count, "Invalid instance count.");
                    Assert.AreEqual(2, GridionFactory.GetDisposedInstanceNumber(), "Invalid instance count.");
                }
            }
        }
Ejemplo n.º 4
0
 public void TearDown()
 {
     GridionFactory.StopAll();
 }