コード例 #1
0
        public void InitializeAndShutdownGrpcEnvironment()
        {
            var env = GrpcEnvironment.GetInstance();

            Assert.IsNotNull(env.CompletionQueue);
            GrpcEnvironment.Shutdown();
        }
コード例 #2
0
        public void SubsequentInvocations()
        {
            var env1 = GrpcEnvironment.GetInstance();
            var env2 = GrpcEnvironment.GetInstance();

            Assert.IsTrue(object.ReferenceEquals(env1, env2));
            GrpcEnvironment.Shutdown();
            GrpcEnvironment.Shutdown();
        }
コード例 #3
0
        public void InitializeAfterShutdown()
        {
            var env1 = GrpcEnvironment.GetInstance();

            GrpcEnvironment.Shutdown();

            var env2 = GrpcEnvironment.GetInstance();

            GrpcEnvironment.Shutdown();

            Assert.IsFalse(object.ReferenceEquals(env1, env2));
        }