コード例 #1
0
ファイル: GridionTests.cs プロジェクト: bluetsys/gridion
        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.");
                }
            }
        }