示例#1
0
        public void Lookup_MaskedEntryExists_LooksUpCorrectValue()
        {
            var testStatus = DicomStatus.PrintManagementFilmBoxEmptyPage;
            var status     = DicomStatus.Lookup(testStatus.Code);

            Assert.True(status.Code == testStatus.Code);
        }
示例#2
0
        public void Lookup_WithWarning_ReturnsCorrectStatusClass()
        {
            var statusTest = DicomStatus.Lookup(_stateUPSIsAlreadyCompleted.Code);

            // Code B306 is not in the known list. So the DicomStatus.Lookup shall return
            // the original code, but a status and Description that matches best one of
            // the known states.
            Assert.Equal(_stateUPSIsAlreadyCompleted.State, statusTest.State);
            Assert.Equal(_stateUPSIsAlreadyCompleted.Code, statusTest.Code);
            Assert.NotEqual(_stateUPSIsAlreadyCompleted.Description, statusTest.Description);
        }
示例#3
0
 public void AddKnownDicomStatuses_WithFailure_IsLookedupCorrectly()
 {
     try
     {
         DicomStatus.AddKnownDicomStatuses(new[] { _stateUPSIsAlreadyCompleted, _stateSOPInstanceDoesNotExist });
         var upsCompleteTest = DicomStatus.Lookup(_stateUPSIsAlreadyCompleted.Code);
         Assert.Equal(_stateUPSIsAlreadyCompleted, upsCompleteTest);
         Assert.Equal(_stateUPSIsAlreadyCompleted.Code, upsCompleteTest.Code);
         Assert.Equal(_stateUPSIsAlreadyCompleted.Description, upsCompleteTest.Description);
         var sopDoesNotExistTest = DicomStatus.Lookup(_stateUPSIsAlreadyCompleted.Code);
         Assert.Equal(_stateUPSIsAlreadyCompleted, sopDoesNotExistTest);
         Assert.Equal(_stateUPSIsAlreadyCompleted.Code, sopDoesNotExistTest.Code);
         Assert.Equal(_stateUPSIsAlreadyCompleted.Description, sopDoesNotExistTest.Description);
     }
     finally
     {
         DicomStatus.ResetEntries();
     }
 }