Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineatstariongroup committed Jan 30, 2025
1 parent 5a30512 commit 3663490
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CDP4Dal/DAL/Credentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ public void ProvideUserToken(string token, AuthenticationSchemeKind authenticati
/// <summary>
/// Provides an asserts to assess that all informations are ready to be provided
/// </summary>
public bool IsFullyInitiliazed => this.ComputeIsFullyInitialized();
public bool IsFullyInitialized => this.ComputeIsFullyInitialized();

/// <summary>
/// Compute the <see cref="IsFullyInitiliazed"/> property
/// Compute the <see cref="IsFullyInitialized"/> property
/// </summary>
/// <returns>The asserts computated</returns>
private bool ComputeIsFullyInitialized()
Expand Down
2 changes: 1 addition & 1 deletion CDP4Dal/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ public async Task AuthenticateAndOpen(AuthenticationSchemeKind authenticationSch
/// <exception cref="InvalidOperationException">If all required <see cref="Credentials"/> informations are not provided</exception>
public async Task RefreshAuthenticationInformation()
{
if (this.Credentials.IsFullyInitiliazed)
if (this.Credentials.IsFullyInitialized)
{
throw new InvalidOperationException("Cannot refresh authentication information when credentials are fully initiliazed");
}
Expand Down
14 changes: 7 additions & 7 deletions CDP4ServicesDal.NetCore.Tests/CdpServicesDalTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,11 @@ public async Task VerifyWriteLongRunningTask()
// To test this, please enable one by one authentication scheme on the CDP4 COMET Server
public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
{
var authentitcatioCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationCredentials = new Credentials(new Uri("http://localhost:5000/"));
var servicesDal = new CdpServicesDal();

var cancellationSource = new CancellationTokenSource();
servicesDal.InitializeDalCredentials(authentitcatioCredentials);
servicesDal.InitializeDalCredentials(authenticationCredentials);
var availableScheme = (await servicesDal.RequestAvailableAuthenticationScheme(cancellationSource.Token)).Schemes.Single();
const string username = "admin";
const string password = "pass";
Expand All @@ -884,17 +884,17 @@ public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
switch (availableScheme)
{
case AuthenticationSchemeKind.Basic:
authentitcatioCredentials.ProvideUserCredentials(username, password, availableScheme);
authenticationCredentials.ProvideUserCredentials(username, password, availableScheme);
break;
case AuthenticationSchemeKind.LocalJwtBearer:
await servicesDal.Login(username, password, cancellationSource.Token);
break;
case AuthenticationSchemeKind.ExternalJwtBearer:
authentitcatioCredentials.ProvideUserToken(externalToken,availableScheme);
authenticationCredentials.ProvideUserToken(externalToken,availableScheme);
break;
}

var readThings = await servicesDal.Open(authentitcatioCredentials, cancellationSource.Token);
var readThings = await servicesDal.Open(authenticationCredentials, cancellationSource.Token);
cancellationSource.Dispose();

Assert.That(readThings, Is.Not.Empty);
Expand All @@ -906,8 +906,8 @@ public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
// To test this, please enable one by one authentication scheme on the CDP4 COMET Server
public async Task VerifyCanAuthenticateWithMultipleSchemeAtSessionLevel()
{
var authentitcatioCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationSession = new Session(new CdpServicesDal(), authentitcatioCredentials, this.messageBus);
var authenticationCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationSession = new Session(new CdpServicesDal(), authenticationCredentials, this.messageBus);

var availableScheme = (await authenticationSession.QueryAvailableAuthenticationScheme()).Schemes.Single();

Expand Down
14 changes: 7 additions & 7 deletions CDP4ServicesDal.Tests/CdpServicesDalTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,11 @@ public async Task VerifyWriteLongRunningTask()
// To test this, please enable one by one authentication scheme on the CDP4 COMET Server
public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
{
var authentitcatioCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationCredentials = new Credentials(new Uri("http://localhost:5000/"));
var servicesDal = new CdpServicesDal();

var cancellationSource = new CancellationTokenSource();
servicesDal.InitializeDalCredentials(authentitcatioCredentials);
servicesDal.InitializeDalCredentials(authenticationCredentials);
var availableScheme = (await servicesDal.RequestAvailableAuthenticationScheme(cancellationSource.Token)).Schemes.Single();
const string username = "admin";
const string password = "pass";
Expand All @@ -919,17 +919,17 @@ public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
switch (availableScheme)
{
case AuthenticationSchemeKind.Basic:
authentitcatioCredentials.ProvideUserCredentials(username, password, availableScheme);
authenticationCredentials.ProvideUserCredentials(username, password, availableScheme);
break;
case AuthenticationSchemeKind.LocalJwtBearer:
await servicesDal.Login(username, password, cancellationSource.Token);
break;
case AuthenticationSchemeKind.ExternalJwtBearer:
authentitcatioCredentials.ProvideUserToken(externalToken,availableScheme);
authenticationCredentials.ProvideUserToken(externalToken,availableScheme);
break;
}

var readThings = await servicesDal.Open(authentitcatioCredentials, cancellationSource.Token);
var readThings = await servicesDal.Open(authenticationCredentials, cancellationSource.Token);
cancellationSource.Dispose();

Assert.That(readThings, Is.Not.Empty);
Expand All @@ -941,8 +941,8 @@ public async Task VerifyCanAuthenticateWithMultipleSchemeAtDalLevel()
// To test this, please enable one by one authentication scheme on the CDP4 COMET Server
public async Task VerifyCanAuthenticateWithMultipleSchemeAtSessionLevel()
{
var authentitcatioCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationSession = new Session(new CdpServicesDal(), authentitcatioCredentials, this.messageBus);
var authenticationCredentials = new Credentials(new Uri("http://localhost:5000/"));
var authenticationSession = new Session(new CdpServicesDal(), authenticationCredentials, this.messageBus);

var availableScheme = (await authenticationSession.QueryAvailableAuthenticationScheme()).Schemes.Single();

Expand Down
18 changes: 9 additions & 9 deletions CDP4ServicesDal/CdpServicesDal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public override bool IsReadOnly
/// </returns>
public override async Task<IEnumerable<Thing>> Write(OperationContainer operationContainer, IEnumerable<string> files = null)
{
if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("The CDP4 DAL is not open.");
}
Expand Down Expand Up @@ -286,7 +286,7 @@ private async Task ProcessWriteException(HttpResponseMessage httpResponseMessage
/// <exception cref="ArgumentOutOfRangeException">If the provided <paramref name="waitTime"/> is lower than 1</exception>
public override async Task<LongRunningTaskResult> Write(OperationContainer operationContainer, int waitTime, IEnumerable<string> files = null)
{
if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("The CDP4 DAL is not open.");
}
Expand Down Expand Up @@ -459,7 +459,7 @@ public override async Task<IEnumerable<EngineeringModel>> Read(IEnumerable<CDP4C
throw new InvalidOperationException("The Session may not be null and must be set prior to reading the EngineeringModels");
}

if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("The CDP4-COMET DAL is not open.");
}
Expand Down Expand Up @@ -533,7 +533,7 @@ public override async Task<IEnumerable<EngineeringModel>> Read(IEnumerable<CDP4C
/// <returns>an await-able <see cref="Task"/> that returns a <see cref="byte"/> array.</returns>
public override async Task<byte[]> ReadFile(Thing thing, CancellationToken cancellationToken)
{
if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("The CDP4 DAL is not open.");
}
Expand Down Expand Up @@ -611,7 +611,7 @@ public override async Task<byte[]> ReadFile(Thing thing, CancellationToken cance
/// </returns>
public override async Task<IEnumerable<Thing>> Read<T>(T thing, CancellationToken cancellationToken, IQueryAttributes attributes = null)
{
if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("The CDP4 DAL is not open.");
}
Expand Down Expand Up @@ -887,9 +887,9 @@ public override async Task<IEnumerable<Thing>> Open(Credentials credentials, Can
throw new ArgumentNullException(nameof(credentials.Uri), $"The Credentials URI may not be null");
}

if (!credentials.IsFullyInitiliazed)
if (!credentials.IsFullyInitialized)
{
throw new ArgumentException("The Credentials is not be fully initiliazed");
throw new ArgumentException("The Credentials is not be fully initialized");
}

UriExtensions.AssertUriIsHttpOrHttpsSchema(credentials.Uri);
Expand Down Expand Up @@ -988,7 +988,7 @@ public override void ApplyAuthenticationCredentials(Credentials credentials)
throw new InvalidOperationException("Connection to datasource not established");
}

if (credentials is not { IsFullyInitiliazed: true })
if (credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("Credentials not fully initialized");
}
Expand Down Expand Up @@ -1599,7 +1599,7 @@ private static void VerifyOperationContainerNotNull(OperationContainer operation
/// <returns>A <see cref="Task{TResult}"/> that contains the retrieved user shortname</returns>
private async Task<string> QueryAuthenticatedUserName(CancellationToken cancellationToken)
{
if (this.Credentials is not { IsFullyInitiliazed: true })
if (this.Credentials is not { IsFullyInitialized: true })
{
throw new InvalidOperationException("Credentials are not fully initiliazed");
}
Expand Down

0 comments on commit 3663490

Please sign in to comment.