This repository was archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprecation metadata to registration when it is present in catalog (
#525)
- Loading branch information
Scott Bommarito
authored
May 21, 2019
1 parent
d7826c0
commit 9b4edff
Showing
11 changed files
with
374 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/CatalogTests/Helpers/RegistrationPackageDeprecationAlternatePackage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Newtonsoft.Json; | ||
using NgTests; | ||
|
||
namespace CatalogTests.Helpers | ||
{ | ||
public class RegistrationPackageDeprecationAlternatePackage | ||
{ | ||
[JsonConstructor] | ||
public RegistrationPackageDeprecationAlternatePackage( | ||
string id, | ||
string range) | ||
{ | ||
Id = id; | ||
Range = range; | ||
} | ||
|
||
[JsonProperty(CatalogConstants.Id)] | ||
public string Id { get; } | ||
|
||
[JsonProperty(CatalogConstants.Range)] | ||
public string Range { get; } | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
tests/CatalogTests/Helpers/RegistrationPackageDeprecationDetails.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Newtonsoft.Json; | ||
using NgTests; | ||
|
||
namespace CatalogTests.Helpers | ||
{ | ||
public class RegistrationPackageDeprecation | ||
{ | ||
[JsonConstructor] | ||
public RegistrationPackageDeprecation( | ||
string[] reasons, | ||
string message = null, | ||
RegistrationPackageDeprecationAlternatePackage alternatePackage = null) | ||
{ | ||
Reasons = reasons; | ||
Message = message; | ||
AlternatePackage = alternatePackage; | ||
} | ||
|
||
[JsonProperty(CatalogConstants.Reasons)] | ||
public string[] Reasons { get; } | ||
|
||
[JsonProperty(CatalogConstants.Message)] | ||
public string Message { get; } | ||
|
||
[JsonProperty(CatalogConstants.AlternatePackage)] | ||
public RegistrationPackageDeprecationAlternatePackage AlternatePackage { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.