Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan Caruso committed Jan 11, 2025
1 parent 5e794ce commit eff7505
Showing 1 changed file with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// Ignore Spelling: Metadata Validator Retreiver
// Ignore Spelling: Metadata Validator

using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.IO;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Time.Testing;
Expand Down Expand Up @@ -38,7 +37,7 @@ public async Task GetPublicMetadata(ConfigurationManagerTheoryData<OpenIdConnect
{
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(
theoryData.MetadataAddress,
theoryData.ConfigurationRetreiver,
theoryData.ConfigurationRetriever,
theoryData.DocumentRetriever,
theoryData.ConfigurationValidator);

Expand All @@ -61,31 +60,31 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>("AccountsGoogleCom")
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
MetadataAddress = OpenIdConfigData.AccountsGoogle
});

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>("AADCommonUrl")
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
MetadataAddress = OpenIdConfigData.AADCommonUrl
});

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>("AADCommonUrlV1")
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
MetadataAddress = OpenIdConfigData.AADCommonUrlV1
});

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>("AADCommonUrlV2")
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
MetadataAddress = OpenIdConfigData.AADCommonUrlV2
Expand All @@ -100,7 +99,7 @@ public void OpenIdConnectConstructor(ConfigurationManagerTheoryData<OpenIdConnec
var context = TestUtilities.WriteHeader($"{this}.OpenIdConnectConstructor", theoryData);
try
{
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(theoryData.MetadataAddress, theoryData.ConfigurationRetreiver, theoryData.DocumentRetriever, theoryData.ConfigurationValidator);
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(theoryData.MetadataAddress, theoryData.ConfigurationRetriever, theoryData.DocumentRetriever, theoryData.ConfigurationValidator);
theoryData.ExpectedException.ProcessNoException();
}
catch (Exception ex)
Expand All @@ -119,7 +118,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
ExpectedException = ExpectedException.ArgumentNullException("IDX10000:"),
Expand All @@ -130,7 +129,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = null,
ConfigurationRetriever = null,
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = new HttpDocumentRetriever(),
ExpectedException = ExpectedException.ArgumentNullException("IDX10000:"),
Expand All @@ -140,7 +139,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = new OpenIdConnectConfigurationValidator(),
DocumentRetriever = null,
ExpectedException = ExpectedException.ArgumentNullException("IDX10000:"),
Expand All @@ -150,7 +149,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = null,
DocumentRetriever = new HttpDocumentRetriever(),
ExpectedException = ExpectedException.ArgumentNullException("IDX10000:"),
Expand Down Expand Up @@ -833,7 +832,7 @@ public async Task ValidateOpenIdConnectConfigurationTests(ConfigurationManagerTh
TestUtilities.WriteHeader($"{this}.ValidateOpenIdConnectConfigurationTests");
var context = new CompareContext();
OpenIdConnectConfiguration configuration;
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(theoryData.MetadataAddress, theoryData.ConfigurationRetreiver, theoryData.DocumentRetriever, theoryData.ConfigurationValidator);
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(theoryData.MetadataAddress, theoryData.ConfigurationRetriever, theoryData.DocumentRetriever, theoryData.ConfigurationValidator);

if (theoryData.PresetCurrentConfiguration)
TestUtilities.SetField(configurationManager, "_currentConfiguration", new OpenIdConnectConfiguration() { Issuer = Default.Issuer });
Expand Down Expand Up @@ -873,7 +872,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator,
DocumentRetriever = new FileDocumentRetriever(),
First = true,
Expand All @@ -883,7 +882,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
ExpectedException = new ExpectedException(typeof(InvalidOperationException), "IDX21818:", typeof(InvalidConfigurationException)),
Expand All @@ -893,7 +892,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
PresetCurrentConfiguration = true,
Expand All @@ -904,7 +903,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
ExpectedException = new ExpectedException(typeof(InvalidOperationException), "IDX10810:", typeof(InvalidConfigurationException)),
Expand All @@ -914,7 +913,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
PresetCurrentConfiguration = true,
Expand All @@ -925,7 +924,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
ExpectedException = new ExpectedException(typeof(InvalidOperationException), "IDX21817:", typeof(InvalidConfigurationException)),
Expand All @@ -935,7 +934,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
PresetCurrentConfiguration = true,
Expand All @@ -946,7 +945,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
ExpectedException = new ExpectedException(typeof(InvalidOperationException), "IDX10814:", typeof(InvalidConfigurationException)),
Expand All @@ -956,7 +955,7 @@ public static TheoryData<ConfigurationManagerTheoryData<OpenIdConnectConfigurati

theoryData.Add(new ConfigurationManagerTheoryData<OpenIdConnectConfiguration>
{
ConfigurationRetreiver = new OpenIdConnectConfigurationRetriever(),
ConfigurationRetriever = new OpenIdConnectConfigurationRetriever(),
ConfigurationValidator = openIdConnectConfigurationValidator2,
DocumentRetriever = new FileDocumentRetriever(),
PresetCurrentConfiguration = true,
Expand Down Expand Up @@ -1002,7 +1001,7 @@ public ConfigurationManagerTheoryData(string testId) : base(testId) { }

public TimeSpan AutomaticRefreshInterval { get; set; }

public IConfigurationRetriever<T> ConfigurationRetreiver { get; set; }
public IConfigurationRetriever<T> ConfigurationRetriever { get; set; }

public IConfigurationValidator<T> ConfigurationValidator { get; set; }

Expand Down

0 comments on commit eff7505

Please sign in to comment.