コード例 #1
0
ファイル: ServicesTests.cs プロジェクト: gridion/gridion
        public void ServiceNamesTest()
        {
            using (IGridionService distributedCollectionService = new DistributedCollectionService())
            {
                Assert.AreEqual("DistributedCollectionService", distributedCollectionService.Name);
            }

            using (IGridionService outMessengerService = new MemoryMessengerService())
            {
                Assert.AreEqual("MemoryMessengerService", outMessengerService.Name);
            }
        }
コード例 #2
0
        public void ServiceNamesTest()
        {
            using (IGridionService distributedCollectionService = new DistributedCollectionService())
            {
                Assert.AreEqual("DistributedCollectionService", distributedCollectionService.Name);
            }

            var clusterCurator = Substitute.For <IClusterCurator>();

            using (IGridionService outMessengerService = new MemoryMessengerService(clusterCurator))
            {
                Assert.AreEqual("MemoryMessengerService", outMessengerService.Name);
            }
        }
コード例 #3
0
ファイル: ServicesTests.cs プロジェクト: gridion/gridion
        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);
                }
            }
        }
コード例 #4
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);
                }
            }
        }