public void SanitizeKeyTests(string oldKey, string newKey) { // Act var result = KeyFormatter.SanitizeKey(oldKey); // Assert result.Should().Be(newKey); }
public RepositoryConfiguration( string repositoryOwner, string repositoryName, string hashTags) { PartitionKey = KeyFormatter.SanitizeKey(Configuration.RepositoryConfigurations.PartitionKey); RowKey = KeyFormatter.SanitizeKey($"{repositoryOwner}|{repositoryName}"); RepositoryOwner = repositoryOwner; RepositoryName = repositoryName; HashTags = hashTags; CreatedAt = DateTime.UtcNow; IsActive = true; }
public PublicationConfiguration( string publicationSourceOwner, string publicationSourceName, string publicationUrl, string hashTags) { PartitionKey = KeyFormatter.SanitizeKey(Configuration.PublicationConfigurations.PartitionKey); RowKey = KeyFormatter.SanitizeKey($"{publicationSourceOwner}|{publicationSourceName}"); PublicationSourceOwner = publicationSourceOwner; PublicationSourceName = publicationSourceName; PublicationSourceUrl = publicationUrl; HashTags = hashTags; IsActive = true; }
public Publication( string publicationSourceName, string id, DateTimeOffset publicationDate, string title, string description, string url, string hashTags) { PartitionKey = KeyFormatter.SanitizeKey(publicationSourceName); PublicationSourceName = publicationSourceName; RowKey = KeyFormatter.SanitizeKey($"{id}-{publicationDate.ToUnixTimeSeconds()}"); Id = id; PublicationDate = publicationDate; Title = title; Description = description; Url = url; HashTags = hashTags; }
public RepositoryRelease( string repositoryName, int releaseId, string releaseName, string tagName, DateTimeOffset createdAt, string htmlUrl, string body, string hashTags ) { PartitionKey = KeyFormatter.SanitizeKey(repositoryName); RowKey = KeyFormatter.SanitizeKey($"{releaseId.ToString()}-{tagName}"); ReleaseId = releaseId; RepositoryName = repositoryName; ReleaseName = releaseName; TagName = tagName; ReleaseCreatedAt = createdAt; HtmlUrl = htmlUrl; Body = body; HashTags = hashTags; CreatedAt = DateTimeOffset.Now; }