Unique-ify extension types to not be ambiguous.

- Also updated test class names to reflect new extension naming.

#148
This commit is contained in:
N. Taylor Mullen 2016-05-26 10:31:13 -07:00
parent d1bacbf41e
commit cc9873ae6c
6 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.DataProtection
/// <summary>
/// Helpful extension methods for data protection APIs.
/// </summary>
public static class DataProtectionExtensions
public static class DataProtectionCommonExtensions
{
/// <summary>
/// Creates an <see cref="IDataProtector"/> given a list of purposes.

View File

@ -5,7 +5,7 @@ using System;
namespace Microsoft.AspNetCore.DataProtection
{
public static class DataProtectionExtensions
public static class DataProtectionAdvancedExtensions
{
/// <summary>
/// Cryptographically protects a piece of plaintext data, expiring the data after

View File

@ -9,7 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.AspNetCore.DataProtection
{
public static class DataProtectionExtensions
public static class DataProtectionUtilityExtensions
{
/// <summary>
/// Returns a unique identifier for this application.

View File

@ -12,7 +12,7 @@ using Xunit;
namespace Microsoft.AspNetCore.DataProtection
{
public class DataProtectionExtensionsTests
public class DataProtectionCommonExtensionsTests
{
[Theory]
[InlineData(new object[] { new string[0] })]
@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.DataProtection
mockProtector.Setup(p => p.Unprotect(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 })).Returns(new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f });
// Act
string retVal = DataProtectionExtensions.Unprotect(mockProtector.Object, "AQIDBAU");
string retVal = DataProtectionCommonExtensions.Unprotect(mockProtector.Object, "AQIDBAU");
// Assert
Assert.Equal("Hello", retVal);

View File

@ -9,7 +9,7 @@ using Xunit;
namespace Microsoft.AspNetCore.DataProtection
{
public class DataProtectionExtensionsTests
public class DataProtectionAdvancedExtensionsTests
{
private const string SampleEncodedString = "AQI"; // = WebEncoders.Base64UrlEncode({ 0x01, 0x02 })

View File

@ -9,7 +9,7 @@ using Xunit;
namespace Microsoft.AspNetCore.DataProtection
{
public class DataProtectionExtensionsTests
public class DataProtectionUtilityExtensionsTests
{
[Theory]
[InlineData(" discriminator", "app-path ", "discriminator")] // normalized trim