public void Init()
        {
            // Create a fake server just so we have an instance to refer to.
            // The server won't actually be used at all.
            server = new Server()
            {
                Ports = { { "localhost", 0, ServerCredentials.Insecure } }
            };
            server.Start();

            fakeCall        = new FakeNativeCall();
            asyncCallServer = new AsyncCallServer <string, string>(
                Marshallers.StringMarshaller.Serializer, Marshallers.StringMarshaller.Deserializer,
                server);
            asyncCallServer.InitializeForTesting(fakeCall);
        }
        public void Init()
        {
            // Create a fake server just so we have an instance to refer to.
            // The server won't actually be used at all.
            server = new Server()
            {
                Ports = { { "localhost", 0, ServerCredentials.Insecure } }
            };
            server.Start();

            fakeCall = new FakeNativeCall();
            asyncCallServer = new AsyncCallServer<string, string>(
                Marshallers.StringMarshaller.Serializer, Marshallers.StringMarshaller.Deserializer,
                server);
            asyncCallServer.InitializeForTesting(fakeCall);
        }
 static void AssertFinished(AsyncCallServer <string, string> asyncCallServer, FakeNativeCall fakeCall, Task finishedTask)
 {
     Assert.IsTrue(fakeCall.IsDisposed);
     Assert.IsTrue(finishedTask.IsCompleted);
     Assert.DoesNotThrow(() => finishedTask.Wait());
 }
 static void AssertFinished(AsyncCallServer<string, string> asyncCallServer, FakeNativeCall fakeCall, Task finishedTask)
 {
     Assert.IsTrue(fakeCall.IsDisposed);
     Assert.IsTrue(finishedTask.IsCompleted);
     Assert.DoesNotThrow(() => finishedTask.Wait());
 }