< Summary

Class:Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedModelFactory
Assembly:Azure.Storage.Blobs.ChangeFeed
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs.ChangeFeed\src\Models\BlobChangeFeedModelFactory.cs
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:72
Line coverage:0% (0 of 27)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
BlobChangeFeedEvent(...)-0%100%
BlobChangeFeedEventData(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs.ChangeFeed\src\Models\BlobChangeFeedModelFactory.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Storage.Blobs.Models;
 6
 7namespace Azure.Storage.Blobs.ChangeFeed
 8{
 9    /// <summary>
 10    /// BlobChangeFeedModelFactory for building mock objects.
 11    /// </summary>
 12    public static class BlobChangeFeedModelFactory
 13    {
 14        /// <summary>
 15        /// Creates a new BlobChangeFeedEvent instance for mocking.
 16        /// </summary>
 17        public static BlobChangeFeedEvent BlobChangeFeedEvent(
 18            string topic,
 19            string subject,
 20            BlobChangeFeedEventType eventType,
 21            DateTimeOffset eventTime,
 22            Guid id,
 23            BlobChangeFeedEventData eventData,
 24            long dataVersion,
 25            string metadataVersion)
 026            => new BlobChangeFeedEvent
 027            {
 028                Topic = topic,
 029                Subject = subject,
 030                EventType = eventType,
 031                EventTime = eventTime,
 032                Id = id,
 033                EventData = eventData,
 034                SchemaVersion = dataVersion,
 035                MetadataVersion = metadataVersion
 036            };
 37
 38        /// <summary>
 39        /// Creates a new BlobChangeFeedEventData instance for mocking.
 40        /// </summary>
 41        public static BlobChangeFeedEventData BlobChangeFeedEventData(
 42            string api,
 43            Guid clientRequestId,
 44            Guid requestId,
 45            ETag eTag,
 46            string contentType,
 47            long contentLength,
 48            BlobType blobType,
 49            long contentOffset,
 50            Uri destinationUri,
 51            Uri sourceUri,
 52            Uri uri,
 53            bool recursive,
 54            string sequencer)
 055            => new BlobChangeFeedEventData
 056            {
 057                BlobOperationName = api,
 058                ClientRequestId = clientRequestId,
 059                RequestId = requestId,
 060                ETag = eTag,
 061                ContentType = contentType,
 062                ContentLength = contentLength,
 063                BlobType = blobType,
 064                ContentOffset = contentOffset,
 065                DestinationUri = destinationUri,
 066                SourceUri = sourceUri,
 067                Uri = uri,
 068                Recursive = recursive,
 069                Sequencer = sequencer
 070            };
 71    }
 72}