Skip to content

Commit 0005bd0

Browse files
committed
refactor: rename extension method to WithPostgreSQL
1 parent e4d0312 commit 0005bd0

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

examples/umami/CommunityToolkit.Aspire.Hosting.Umami.AppHost/AppHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
var umami = builder
1616
.AddUmami("umami", port: 55932)
17-
.WithStorageBackend(postgresdb)
17+
.WithPostgreSQL(postgresdb)
1818
.OnResourceReady(async (resource, _, ct) =>
1919
{
2020
var umamiEndpoint = await resource.GetEndpoint("http").GetValueAsync(ct).ConfigureAwait(false);

src/CommunityToolkit.Aspire.Hosting.Umami/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var db = builder.AddPostgres("postgres")
2121
.AddDatabase("db");
2222

2323
var umami = builder.AddUmami("umami")
24-
.WithStorageBackend(db);
24+
.WithPostgreSQL(db);
2525
```
2626

2727
## Additional Information

src/CommunityToolkit.Aspire.Hosting.Umami/UmamiBuilderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static class UmamiBuilderExtensions
3333
/// var db = builder.AddPostgres("postgres")
3434
/// .AddDatabase("db");
3535
/// var umami = builder.AddUmami("umami")
36-
/// .WithStorageBackend(db);
36+
/// .WithPostgreSQL(db);
3737
///
3838
/// builder.Build().Run();
3939
/// </code>
@@ -71,7 +71,7 @@ public static IResourceBuilder<UmamiResource> AddUmami(
7171
/// <param name="builder">The Umami resource builder.</param>
7272
/// <param name="database">The PostgreSQL database resource builder.</param>
7373
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
74-
public static IResourceBuilder<UmamiResource> WithStorageBackend(
74+
public static IResourceBuilder<UmamiResource> WithPostgreSQL(
7575
this IResourceBuilder<UmamiResource> builder,
7676
IResourceBuilder<PostgresDatabaseResource> database
7777
)

tests/CommunityToolkit.Aspire.Hosting.Umami.Tests/UmamiPublicApiTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ public void AddUmamiShouldThrowWhenNameIsNull()
3333
Assert.Equal(nameof(name), exception.ParamName);
3434
}
3535

36-
[Fact]
37-
public void WithStorageBackendShouldThrowWhenBuilderIsNull()
38-
{
39-
IResourceBuilder<UmamiResource> builder = null!;
36+
[Fact]
37+
public void WithPostgreSQLShouldThrowWhenBuilderIsNull()
38+
{
39+
IResourceBuilder<UmamiResource> builder = null!;
4040

41-
var action = () => builder.WithStorageBackend(null!);
41+
var action = () => builder.WithPostgreSQL(null!);
4242

43-
var exception = Assert.Throws<ArgumentNullException>(action);
44-
Assert.Equal(nameof(builder), exception.ParamName);
45-
}
43+
var exception = Assert.Throws<ArgumentNullException>(action);
44+
Assert.Equal(nameof(builder), exception.ParamName);
45+
}
4646

4747
[Fact]
4848
public void CtorUmamiResourceShouldThrowWhenNameIsNull()
@@ -57,4 +57,4 @@ public void CtorUmamiResourceShouldThrowWhenNameIsNull()
5757
var exception = Assert.Throws<ArgumentNullException>(action);
5858
Assert.Equal(nameof(name), exception.ParamName);
5959
}
60-
}
60+
}

0 commit comments

Comments
 (0)