示例#1
0
        public void StartStopTest()
        {
            using (IGridionService distributedCollectionService = new DistributedCollectionService())
            {
                using (IGridionService messengerService = new MemoryMessengerService())
                {
                    distributedCollectionService.Start();
                    messengerService.Start();

                    Assert.IsTrue(distributedCollectionService.IsRunning);
                    Assert.IsTrue(messengerService.IsRunning);

                    distributedCollectionService.Stop();
                    messengerService.Stop();

                    Assert.IsFalse(distributedCollectionService.IsRunning);
                    Assert.IsFalse(messengerService.IsRunning);
                }
            }
        }
示例#2
0
        public void StartStopTest()
        {
            using (IGridionService distributedCollectionService = new DistributedCollectionService())
            {
                var clusterCurator = Substitute.For <IClusterCurator>();
                using (IGridionService messengerService = new MemoryMessengerService(clusterCurator))
                {
                    distributedCollectionService.Start();
                    messengerService.Start();

                    Assert.IsTrue(distributedCollectionService.IsRunning);
                    Assert.IsTrue(messengerService.IsRunning);

                    distributedCollectionService.Stop();
                    messengerService.Stop();

                    Assert.IsFalse(distributedCollectionService.IsRunning);
                    Assert.IsFalse(messengerService.IsRunning);
                }
            }
        }