@@ -250,6 +250,7 @@ public async Task EndpointsGetDevLocalhostUrlsWhenDashboardHasDevLocalhostUrl(st
250250 var tcs = new TaskCompletionSource ( ) ;
251251 var projectB = builder . AddProject < ProjectB > ( "projectb" )
252252 . WithEndpoint ( scheme : "tcp" )
253+ . WithUrlForEndpoint ( "http" , u => u . DisplayText = "Custom Display Text" )
253254 . OnBeforeResourceStarted ( ( _ , _ , _ ) =>
254255 {
255256 tcs . SetResult ( ) ;
@@ -261,13 +262,27 @@ public async Task EndpointsGetDevLocalhostUrlsWhenDashboardHasDevLocalhostUrl(st
261262 await tcs . Task . DefaultTimeout ( ) ;
262263
263264 var urls = projectB . Resource . Annotations . OfType < ResourceUrlAnnotation > ( ) ;
264- Assert . Equal ( 3 , urls . Count ( ) ) ;
265- Assert . Single ( urls , u => u . Url . StartsWith ( "http://localhost" ) && u . Endpoint ? . EndpointName == "http" && u . DisplayLocation == UrlDisplayLocation . DetailsOnly ) ;
266- Assert . Single ( urls , u => u . Url . StartsWith ( $ "http://{ projectB . Resource . Name . ToLowerInvariant ( ) } { expectedHostSuffix } ") && u . Url . EndsWith ( "/sub-path" )
267- && u . Endpoint ? . EndpointName == "http" && u . DisplayLocation == UrlDisplayLocation . SummaryAndDetails ) ;
268-
269- Assert . Single ( urls , u => u . Url . StartsWith ( "tcp://localhost" ) && u . Endpoint ? . EndpointName == "tcp" ) ;
270- Assert . DoesNotContain ( urls , u => u . Url . Contains ( expectedHostSuffix ) && u . Endpoint ? . EndpointName == "tcp" ) ;
265+ Assert . Collection ( urls ,
266+ u =>
267+ {
268+ Assert . StartsWith ( $ "http://{ projectB . Resource . Name . ToLowerInvariant ( ) } { expectedHostSuffix } ", u . Url ) ;
269+ Assert . EndsWith ( "/sub-path" , u . Url ) ;
270+ Assert . Equal ( "http" , u . Endpoint ? . EndpointName ) ;
271+ Assert . Equal ( UrlDisplayLocation . SummaryAndDetails , u . DisplayLocation ) ;
272+ Assert . Equal ( "Custom Display Text" , u . DisplayText ) ;
273+ } ,
274+ u =>
275+ {
276+ Assert . StartsWith ( "http://localhost" , u . Url ) ;
277+ Assert . Equal ( "http" , u . Endpoint ? . EndpointName ) ;
278+ Assert . Equal ( UrlDisplayLocation . DetailsOnly , u . DisplayLocation ) ;
279+ } ,
280+ u =>
281+ {
282+ Assert . StartsWith ( "tcp://localhost" , u . Url ) ;
283+ Assert . Equal ( "tcp" , u . Endpoint ? . EndpointName ) ;
284+ }
285+ ) ;
271286
272287 await app . StopAsync ( ) ;
273288 }
0 commit comments