Skip to content

Commit

Permalink
feat: made WithUsername private again
Browse files Browse the repository at this point in the history
  • Loading branch information
Jejuni committed Mar 29, 2023
1 parent df52f5f commit 4c13b28
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Testcontainers.MsSql/MsSqlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ public MsSqlBuilder WithDatabase(string database)
.WithEnvironment("SQLCMDDBNAME", database);
}

/// <summary>
/// Sets the MsSql username.
/// </summary>
/// <remarks>
/// The Docker image does not allow to configure the username.
/// </remarks>
/// <param name="username">The MsSql username.</param>
/// <returns>A configured instance of <see cref="MsSqlBuilder" />.</returns>
public MsSqlBuilder WithUsername(string username)
{
return Merge(DockerResourceConfiguration, new MsSqlConfiguration(username: username))
.WithEnvironment("SQLCMDUSER", username);
}

/// <inheritdoc />
public override MsSqlContainer Build()
{
Expand Down Expand Up @@ -124,6 +110,20 @@ protected override MsSqlBuilder Merge(MsSqlConfiguration oldValue, MsSqlConfigur
return new MsSqlBuilder(new MsSqlConfiguration(oldValue, newValue));
}

/// <summary>
/// Sets the MsSql username.
/// </summary>
/// <remarks>
/// The Docker image does not allow to configure the username.
/// </remarks>
/// <param name="username">The MsSql username.</param>
/// <returns>A configured instance of <see cref="MsSqlBuilder" />.</returns>
private MsSqlBuilder WithUsername(string username)
{
return Merge(DockerResourceConfiguration, new MsSqlConfiguration(username: username))
.WithEnvironment("SQLCMDUSER", username);
}

/// <inheritdoc cref="IWaitUntil" />
/// <remarks>
/// Uses the sqlcmd utility scripting variables to detect readiness of the MsSql container:
Expand Down

0 comments on commit 4c13b28

Please sign in to comment.