From cc9873ae6c71fc613851e9999b50edeec5dc9e3e Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 26 May 2016 10:31:13 -0700 Subject: [PATCH] Unique-ify extension types to not be ambiguous. - Also updated test class names to reflect new extension naming. #148 --- ...tectionExtensions.cs => DataProtectionCommonExtensions.cs} | 2 +- ...ctionExtensions.cs => DataProtectionAdvancedExtensions.cs} | 2 +- ...ectionExtensions.cs => DataProtectionUtilityExtensions.cs} | 2 +- ...ensionsTests.cs => DataProtectionCommonExtensionsTests.cs} | 4 ++-- ...sionsTests.cs => DataProtectionAdvancedExtensionsTests.cs} | 2 +- ...nsionsTests.cs => DataProtectionUtilityExtensionsTests.cs} | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename src/Microsoft.AspNetCore.DataProtection.Abstractions/{DataProtectionExtensions.cs => DataProtectionCommonExtensions.cs} (99%) rename src/Microsoft.AspNetCore.DataProtection.Extensions/{DataProtectionExtensions.cs => DataProtectionAdvancedExtensions.cs} (99%) rename src/Microsoft.AspNetCore.DataProtection/{DataProtectionExtensions.cs => DataProtectionUtilityExtensions.cs} (97%) rename test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/{DataProtectionExtensionsTests.cs => DataProtectionCommonExtensionsTests.cs} (98%) rename test/Microsoft.AspNetCore.DataProtection.Extensions.Test/{DataProtectionExtensionsTests.cs => DataProtectionAdvancedExtensionsTests.cs} (98%) rename test/Microsoft.AspNetCore.DataProtection.Test/{DataProtectionExtensionsTests.cs => DataProtectionUtilityExtensionsTests.cs} (97%) diff --git a/src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionExtensions.cs b/src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionCommonExtensions.cs similarity index 99% rename from src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionExtensions.cs rename to src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionCommonExtensions.cs index 78c72193e2..97b1377abe 100644 --- a/src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionExtensions.cs +++ b/src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionCommonExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.DataProtection /// /// Helpful extension methods for data protection APIs. /// - public static class DataProtectionExtensions + public static class DataProtectionCommonExtensions { /// /// Creates an given a list of purposes. diff --git a/src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionExtensions.cs b/src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionAdvancedExtensions.cs similarity index 99% rename from src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionExtensions.cs rename to src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionAdvancedExtensions.cs index 0529a1c15a..cb452164df 100644 --- a/src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionExtensions.cs +++ b/src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionAdvancedExtensions.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.AspNetCore.DataProtection { - public static class DataProtectionExtensions + public static class DataProtectionAdvancedExtensions { /// /// Cryptographically protects a piece of plaintext data, expiring the data after diff --git a/src/Microsoft.AspNetCore.DataProtection/DataProtectionExtensions.cs b/src/Microsoft.AspNetCore.DataProtection/DataProtectionUtilityExtensions.cs similarity index 97% rename from src/Microsoft.AspNetCore.DataProtection/DataProtectionExtensions.cs rename to src/Microsoft.AspNetCore.DataProtection/DataProtectionUtilityExtensions.cs index 2624a5220e..0b72c11864 100644 --- a/src/Microsoft.AspNetCore.DataProtection/DataProtectionExtensions.cs +++ b/src/Microsoft.AspNetCore.DataProtection/DataProtectionUtilityExtensions.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.DataProtection { - public static class DataProtectionExtensions + public static class DataProtectionUtilityExtensions { /// /// Returns a unique identifier for this application. diff --git a/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionExtensionsTests.cs b/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionCommonExtensionsTests.cs similarity index 98% rename from test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionExtensionsTests.cs rename to test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionCommonExtensionsTests.cs index dba42bc903..c6eee2eddc 100644 --- a/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionExtensionsTests.cs +++ b/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionCommonExtensionsTests.cs @@ -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); diff --git a/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionExtensionsTests.cs b/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionAdvancedExtensionsTests.cs similarity index 98% rename from test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionExtensionsTests.cs rename to test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionAdvancedExtensionsTests.cs index b4eafed6fe..11fa056a4b 100644 --- a/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionExtensionsTests.cs +++ b/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionAdvancedExtensionsTests.cs @@ -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 }) diff --git a/test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionExtensionsTests.cs b/test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionUtilityExtensionsTests.cs similarity index 97% rename from test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionExtensionsTests.cs rename to test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionUtilityExtensionsTests.cs index 364d37ccac..8e2cbd71d9 100644 --- a/test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionExtensionsTests.cs +++ b/test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionUtilityExtensionsTests.cs @@ -9,7 +9,7 @@ using Xunit; namespace Microsoft.AspNetCore.DataProtection { - public class DataProtectionExtensionsTests + public class DataProtectionUtilityExtensionsTests { [Theory] [InlineData(" discriminator", "app-path ", "discriminator")] // normalized trim