public void Lookup_MaskedEntryExists_LooksUpCorrectValue() { var testStatus = DicomStatus.PrintManagementFilmBoxEmptyPage; var status = DicomStatus.Lookup(testStatus.Code); Assert.True(status.Code == testStatus.Code); }
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); }
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(); } }