Skip to content

Commit c8db232

Browse files
committed
Minor fixes to prepare release.
1 parent 2175439 commit c8db232

File tree

6 files changed

+55
-9
lines changed

6 files changed

+55
-9
lines changed

src/DotNet.Testcontainers.Tests/TestcontainersTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public async Task QueryNotExistingDockerImageByName()
5858
[Fact]
5959
public async Task QueryNotExistingDockerContainerByName()
6060
{
61-
var a = await MetaDataClientContainers.Instance.ExistsWithNameAsync(string.Empty);
62-
Assert.False(a);
61+
Assert.False(await MetaDataClientContainers.Instance.ExistsWithNameAsync(string.Empty));
6362
}
6463

6564
[Fact]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
namespace DotNet.Testcontainers.Core.Mapper
22
{
3+
/// <summary>
4+
/// Converts or maps the Testcontainers configuration to the official Docker configuration.
5+
/// </summary>
6+
/// <typeparam name="TSource">Testcontainers configuration type.</typeparam>
7+
/// <typeparam name="TTarget">Official Docker configuration type.</typeparam>
38
internal abstract class BaseConverter<TSource, TTarget>
49
{
10+
/// <summary>
11+
/// Initializes a new instance of the <see cref="BaseConverter{TSource, TTarget}"/> class.
12+
/// </summary>
13+
/// <param name="name">Name of the converter.</param>
514
protected BaseConverter(string name)
615
{
716
this.Name = name;
817
}
918

19+
/// <summary>Gets the name of the converter.</summary>
20+
/// <value>Identifies the converter, if source and target types are frequently used.</value>
1021
public string Name { get; }
1122

23+
/// <summary>
24+
/// Converts or maps the Testcontainers configuration to the official Docker configuration.
25+
/// </summary>
26+
/// <param name="source">Testcontainers configuration.</param>
27+
/// <returns>Official Docker configuration.</returns>
1228
public abstract TTarget Convert(TSource source);
1329
}
1430
}

src/DotNet.Testcontainers/Core/Mapper/CollectionConverter.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ namespace DotNet.Testcontainers.Core.Mapper
22
{
33
using System.Collections.Generic;
44

5+
/// <summary>
6+
/// Converts or maps Testcontainers collection configurations to official Docker configurations.
7+
/// </summary>
8+
/// <typeparam name="T">Official Docker configuration type.</typeparam>
59
internal abstract class CollectionConverter<T> : BaseConverter<IReadOnlyCollection<string>, T>
610
{
11+
/// <summary>
12+
/// Initializes a new instance of the <see cref="CollectionConverter{T}"/> class without converter name.
13+
/// </summary>
714
protected CollectionConverter() : base(string.Empty)
815
{
916
}
1017

18+
/// <summary>
19+
/// Initializes a new instance of the <see cref="CollectionConverter{T}"/> class.
20+
/// </summary>
21+
/// <param name="name">Name of the converter.</param>
1122
protected CollectionConverter(string name) : base(name)
1223
{
1324
}

src/DotNet.Testcontainers/Core/Mapper/DictionaryConverter.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ namespace DotNet.Testcontainers.Core.Mapper
22
{
33
using System.Collections.Generic;
44

5+
/// <summary>
6+
/// Converts or maps Testcontainers dictionary configurations to official Docker configurations.
7+
/// </summary>
8+
/// <typeparam name="T">Official Docker configuration type.</typeparam>
59
internal abstract class DictionaryConverter<T> : BaseConverter<IReadOnlyDictionary<string, string>, T>
610
{
11+
/// <summary>
12+
/// Initializes a new instance of the <see cref="DictionaryConverter{T}"/> class without converter name.
13+
/// </summary>
714
protected DictionaryConverter() : base(string.Empty)
815
{
916
}
1017

18+
/// <summary>
19+
/// Initializes a new instance of the <see cref="DictionaryConverter{T}"/> class.
20+
/// </summary>
21+
/// <param name="name">Name of the converter.</param>
1122
protected DictionaryConverter(string name) : base(name)
1223
{
1324
}

src/DotNet.Testcontainers/Core/Mapper/IConverter.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/DotNet.Testcontainers/Core/WaitStrategy.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ private WaitStrategy()
99
{
1010
}
1111

12+
/// <summary>
13+
/// Blocks while condition is true or timeout occurs.
14+
/// </summary>
15+
/// <param name="condition">The condition that will perpetuate the block.</param>
16+
/// <param name="frequency">The frequency in milliseconds to check the condition.</param>
17+
/// <param name="timeout">Timeout in milliseconds.</param>
18+
/// <exception cref="TimeoutException">Thrown as soon as the timeout expires.</exception>
19+
/// <returns>A task that represents the asynchronous block operation.</returns>
1220
public static async Task WaitWhile(Func<bool> condition, int frequency = 25, int timeout = -1)
1321
{
1422
var waitTask = Task.Run(async () =>
@@ -25,6 +33,14 @@ public static async Task WaitWhile(Func<bool> condition, int frequency = 25, int
2533
}
2634
}
2735

36+
/// <summary>
37+
/// Blocks until condition is true or timeout occurs.
38+
/// </summary>
39+
/// <param name="condition">The break condition.</param>
40+
/// <param name="frequency">The frequency in milliseconds to check the condition.</param>
41+
/// <param name="timeout">The timeout in milliseconds.</param>
42+
/// <exception cref="TimeoutException">Thrown as soon as the timeout expires.</exception>
43+
/// <returns>A task that represents the asynchronous block operation.</returns>
2844
public static async Task WaitUntil(Func<bool> condition, int frequency = 25, int timeout = -1)
2945
{
3046
var waitTask = Task.Run(async () =>

0 commit comments

Comments
 (0)