Example #1
0
        public void ConfigViaFile()
        {
            //create service stub
            SearchPhoneticClient client = new SearchPhoneticClient("Phonetic");

            //Call with prepared request
            SearchPhoneticReply response = client.Search(request);

            //Verify result
            Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code);
            PersonType bryan = response.Person.Where(p => p.SSIN == "79021802145").Single();
            Assert.AreEqual(bryan.PersonData.Birth.Date, "1979-02-18");
            Assert.AreEqual(bryan.PersonData.Birth.Localisation.Municipality.PostalCode, "8630");
        }
Example #2
0
        public void ConfigViaFile()
        {
            //create service stub
            SearchPhoneticClient client = new SearchPhoneticClient("Phonetic");

            //Call with prepared request
            SearchPhoneticReply response = client.Search(request);

            //Verify result
            Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code);
            PersonType bryan = response.Person.Where(p => p.SSIN == "79021802145").Single();

            Assert.AreEqual(bryan.PersonData.Birth.Date, "1979-02-18");
            Assert.AreEqual(bryan.PersonData.Birth.Localisation.Municipality.PostalCode, "8630");
        }
Example #3
0
        public void ConfigViaCode()
        {
            //create service stub
            SearchPhoneticClient client = new SearchPhoneticClient(new StsBinding(), new EndpointAddress(new Uri("https://services-acpt.ehealth.fgov.be/consultRN/identifyPerson/v1")));
            client.Endpoint.Behaviors.Remove<ClientCredentials>();
            client.Endpoint.Behaviors.Add(new OptClientCredentials());
            client.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByThumbprint, "cf692e24bac7c1d990496573e64ef999468be67e");

            //Call with prepared request
            SearchPhoneticReply response = client.Search(request);

            //Verify result
            Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code);
            PersonType bryan = response.Person.Where(p => p.SSIN == "79021802145").Single();
            Assert.AreEqual(bryan.PersonData.Birth.Date, "1979-02-18");
            Assert.AreEqual(bryan.PersonData.Birth.Localisation.Municipality.PostalCode, "8630");
        }
Example #4
0
        public void ConfigViaCode()
        {
            //create service stub
            SearchPhoneticClient client = new SearchPhoneticClient(new StsBinding(), new EndpointAddress(new Uri("https://services-acpt.ehealth.fgov.be/consultRN/identifyPerson/v1")));

            client.Endpoint.Behaviors.Remove <ClientCredentials>();
            client.Endpoint.Behaviors.Add(new OptClientCredentials());
            client.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByThumbprint, "cf692e24bac7c1d990496573e64ef999468be67e");

            //Call with prepared request
            SearchPhoneticReply response = client.Search(request);

            //Verify result
            Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code);
            PersonType bryan = response.Person.Where(p => p.SSIN == "79021802145").Single();

            Assert.AreEqual(bryan.PersonData.Birth.Date, "1979-02-18");
            Assert.AreEqual(bryan.PersonData.Birth.Localisation.Municipality.PostalCode, "8630");
        }