public async Task GivenValidTagPath_WhenDeleteExtendedQueryTagIsInvoked_ThenShouldSucceed() { DicomTag tag = DicomTag.DeviceSerialNumber; string tagPath = tag.GetPath(); var entry = new ExtendedQueryTagStoreJoinEntry(tag.BuildExtendedQueryTagStoreEntry()); _extendedQueryTagStore.GetExtendedQueryTagAsync(tagPath, default).Returns(entry); await _extendedQueryTagService.DeleteExtendedQueryTagAsync(tagPath); await _extendedQueryTagStore.Received(1).DeleteExtendedQueryTagAsync(tagPath, entry.VR); }
private void AssertTag( int key, AddExtendedQueryTagEntry expected, ExtendedQueryTagStoreJoinEntry actual, ExtendedQueryTagStatus status = ExtendedQueryTagStatus.Ready, QueryStatus queryStatus = QueryStatus.Enabled, Guid?operationId = null) { Assert.Equal(key, actual.Key); Assert.Equal(expected.Path, actual.Path); Assert.Equal(expected.PrivateCreator, actual.PrivateCreator); Assert.Equal(expected.VR, actual.VR); Assert.Equal(expected.Level, actual.Level); Assert.Equal(status, actual.Status); // Typically we'll set the status to Adding Assert.Equal(queryStatus, actual.QueryStatus); Assert.Equal(operationId, actual.OperationId); }
private async Task AssertAddedAsync(int key, AddExtendedQueryTagEntry expected, ExtendedQueryTagStatus status = ExtendedQueryTagStatus.Ready) { ExtendedQueryTagStoreJoinEntry actual = await _extendedQueryTagStore.GetExtendedQueryTagAsync(expected.Path); AssertTag(key, expected, actual, status); }