public async Task WaitForAssociationAsync_Aborted_ReturnsFalse()
        {
            int port = Ports.GetNext();

            using (DicomServer.Create <MockCEchoProvider>(port))
            {
                var client = new DicomClient();
                client.AddRequest(new DicomCEchoRequest());
                var task = client.SendAsync("127.0.0.1", port, false, "SCU", "ANY-SCP");
                client.Abort();

                var actual = await client.WaitForAssociationAsync(500);

                Assert.False(actual);
            }
        }
Beispiel #2
0
        public void WaitForAssociation_Aborted_ReturnsFalse()
        {
            int port = Ports.GetNext();

            using (new DicomServer <MockCEchoProvider>(port))
            {
                var client = new DicomClient();
                client.AddRequest(new DicomCEchoRequest());
                var task = client.SendAsync("127.0.0.1", port, false, "SCU", "ANY-SCP");

                client.Abort();
                var actual = client.WaitForAssociation(500);

                Assert.Equal(false, actual);
            }
        }
Beispiel #3
0
        public async Task WaitForAssociationAsync_Aborted_ReturnsFalse()
        {
            int port = Ports.GetNext();
            using (DicomServer.Create<MockCEchoProvider>(port))
            {
                var client = new DicomClient();
                client.AddRequest(new DicomCEchoRequest());
                var task = client.SendAsync("127.0.0.1", port, false, "SCU", "ANY-SCP");
                client.Abort();

                var actual = await client.WaitForAssociationAsync(500);

                Assert.Equal(false, actual);
            }
        }