Beispiel #1
0
        private DBWrapper CreateDBWrapper()
        {
            DBWrapper dbWrapper = new DBWrapper();

            if (!dbWrapper.Initialize())
            {
                GlobalDefinition.LoggerWrapper.LogDevError("db initialize is failed, it might be caused by db version");
                return(null);
            }
            return(dbWrapper);
        }
Beispiel #2
0
        public static void MyClassInitialize(TestContext testContext)
        {
            try
            {
                DBWrapper dbWrapper = new DBWrapper();
                if (!dbWrapper.Initialize())
                {
                    return;
                }
                var studyList = dbWrapper.GetAllStudyList();
                if (studyList.Count > 0)
                {
                    _studyInstanceUID = studyList[0].StudyInstanceUID;
                }
                else
                {
                    return;
                }

                _seriesUID = string.Empty;
                var seriesList = dbWrapper.GetSeriesListByStudyInstanceUID(_studyInstanceUID);
                if (seriesList.Count > 0)
                {
                    _seriesUID = seriesList[0].SeriesInstanceUID;
                }
                else
                {
                    return;
                }

                var imageList = dbWrapper.GetImageListBySeriesInstanceUID(_seriesUID);
                if (imageList.Count > 0)
                {
                    _imageUID = imageList[0].SOPInstanceUID;
                }

                //_studyData = new StudyData(_studyInstanceUID);
            }
            catch (Exception ex)
            {
                Logger.LogFuncException(ex.Message + ex.StackTrace);
            }
        }
Beispiel #3
0
        public static void MyClassInitialize(TestContext testContext)
        {
            DBWrapper dbWrapper = new DBWrapper();

            if (!dbWrapper.Initialize())
            {
                return;
            }
            var    studyList        = dbWrapper.GetAllStudyList();
            string studyInstanceUID = string.Empty;

            if (studyList != null && studyList.Count > 0)
            {
                studyInstanceUID = studyList[0].StudyInstanceUID;
            }
            else
            {
                return;
            }

            _seriesUID = string.Empty;
            var seriesList = dbWrapper.GetSeriesListByStudyInstanceUID(studyInstanceUID);

            if (seriesList != null && seriesList.Count > 0)
            {
                _seriesUID = seriesList[0].SeriesInstanceUID;
            }
            else
            {
                return;
            }

            var imageList = dbWrapper.GetImageListBySeriesInstanceUID(_seriesUID);

            if (imageList != null && imageList.Count > 0)
            {
                _imageUID = imageList[0].SOPInstanceUID;
            }

            //_studyData = new StudyData(studyInstanceUID);
        }