public void CreateObjects() { try { if (!CreatedRecords) { CreateSqlRecords(); } var mutex = new Mutex(); var gatewayIp = targetIp; var gatewayPort = targetPort; SetupSqlServer(); using (var motSqlServer = new MotSqlServer($"Data Source={dataSource};Initial Catalog=McKessonTestDb;User ID=sa;Password=$MOT2018")) { var patient = new PollPatient(motSqlServer, mutex, gatewayIp, gatewayPort); var doc = new PollPrescriber(motSqlServer, mutex, gatewayIp, gatewayPort); var facility = new PollFacility(motSqlServer, mutex, gatewayIp, gatewayPort); var scrip = new PollPrescription(motSqlServer, mutex, gatewayIp, gatewayPort); var drug = new PollDrug(motSqlServer, mutex, gatewayIp, gatewayPort); } } catch (Exception ex) { Console.WriteLine(ex.Message); Assert.Fail(ex.Message); } }
public void QueryRx() { try { if (!CreatedRecords) { CreateSqlRecords(); } var mutex = new Mutex(); var gatewayIp = targetIp; var gatewayPort = targetPort; SetupSqlServer(); using (var motSqlServer = new MotSqlServer($"Data Source={dataSource};Initial Catalog=McKessonTestDb;User ID=sa;Password=$MOT2018")) { using (var Rx = new PollPrescription(motSqlServer, mutex, gatewayIp, gatewayPort)) { Rx.UseAscii = useAscii; try { Rx.ReadPrescriptionRecords(); } catch (Exception e) { Console.WriteLine(e); throw; } } } } catch (Exception ex) { Assert.Fail(ex.Message); } }