public void GenerateNewDeprecationNotice_ValidMessageWithAdvancedTimeline_GeneratesExpectedIssue()
        {
            // Arrange
            const string ExpectedIssueContent = @"Azure Cognitive Services Translator v2 is deprecated by 24 May 2021.

**Deadline:** May 24, 2021
**Impacted Services:**
- Azure Cognitive Services

**More information:**
- https://azure.microsoft.com/en-gb/updates/version-2-of-translator-is-retiring-on-24-may-2021/
- https://docs.microsoft.com/en-us/azure/cognitive-services/translator/migrate-to-v3

### Notice

Here's the official report from Microsoft:

> In May 2018, we announced the general availability of version 3 of Translator and will retire version 2 of Translator on 24 May 2021.
> 
> Key benefits of version 3 of Translator include: 
> - More functionalities including bilingual dictionary, transliterate and translate to multiple target languages in a single request.
> - Provides a  [layered security model](https://docs.microsoft.com/en-us/azure/cognitive-services/Welcome#securing-resources) as part of Azure Cognitive Services.
> - Customized translations through [Custom Translator](https://portal.customtranslator.azure.ai/).

### Timeline

| Phase | Date | Description |
|:------|------|-------------|
|Creation Disabled|Jan 01, 2021|No longer able to create new resources with type V1|
|Deprecation|May 24, 2021|Feature will no longer work|

### Impact

Service will no longer be available.

### Required Action

Here's the official report from Microsoft:

> - If you are using version 2 of Translator, please [migrate your applications to version 3](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/migrate-to-v3) before 24 May 2021 to avoid service disruption.
> - Your current Translator subscription and key will work with version 3, there is no need to create a new Translator subscription in the Azure portal.

### Contact

Contact the product group through email ([email](mailto:[email protected])).

### More information

https://docs.microsoft.com/en-us/azure/cognitive-services/translator/migrate-to-v3";

            var newAzureDeprecationV1Message = NewAzureDeprecationGenerator.GenerateSample(useAdvancedTimeline: true);

            // Act
            var issueContent = IssueFactory.GenerateNewDeprecationNotice(newAzureDeprecationV1Message);

            // Assert
            Assert.Equal(ExpectedIssueContent, issueContent);
        }
예제 #2
0
        public void AutoMapper_MapNewAzureDeprecationV1MessageToDeprecationInfo_IsValid()
        {
            //Arrange
            var deprecationInfo = NewAzureDeprecationGenerator.GenerateSample(useAdvancedTimeline: true);

            //Act
            var publishedNotice = _mapper.Map <NewAzureDeprecationV1Message, DeprecationInfo>(deprecationInfo);

            //Assert
            Assert.NotNull(publishedNotice);
            Assert.NotNull(publishedNotice.Contact);
            Assert.NotNull(publishedNotice.Timeline);
            Assert.Equal(deprecationInfo.Title, publishedNotice.Title);
            Assert.Equal(deprecationInfo.RequiredAction.Description, publishedNotice.RequiredAction);
            Assert.Equal(deprecationInfo.AdditionalInformation, publishedNotice.AdditionalInformation);
            Assert.Equal(deprecationInfo.Contact.Count, publishedNotice.Contact.Count);
            foreach (var contactEntry in deprecationInfo.Contact)
            {
                Assert.Contains(publishedNotice.Contact, entry => entry.Type == contactEntry.Type && entry.Data.Equals(contactEntry.Data, StringComparison.InvariantCultureIgnoreCase));
            }
            HasSameNotice(publishedNotice, deprecationInfo);
            HasSameImpact(deprecationInfo, publishedNotice);
        }