@@ -22,42 +22,42 @@ public void GetApplication_SameNameAsReplica_GetInstance()
2222 // Arrange
2323 var appVMs = ApplicationsSelectHelpers . CreateApplications ( new List < OtlpApplication >
2424 {
25- CreateOtlpApplication ( name : "app " , instanceId : "app " ) ,
26- CreateOtlpApplication ( name : "app " , instanceId : "app-abc " ) ,
27- CreateOtlpApplication ( name : "singleton" , instanceId : "singleton-abc " )
25+ CreateOtlpApplication ( name : "multiple " , instanceId : "instance " ) ,
26+ CreateOtlpApplication ( name : "multiple " , instanceId : "instanceabc " ) ,
27+ CreateOtlpApplication ( name : "singleton" , instanceId : "instanceabc " )
2828 } ) ;
2929
3030 Assert . Collection ( appVMs ,
3131 app =>
3232 {
33- Assert . Equal ( "app " , app . Name ) ;
33+ Assert . Equal ( "multiple " , app . Name ) ;
3434 Assert . Equal ( OtlpApplicationType . ResourceGrouping , app . Id ! . Type ) ;
3535 Assert . Null ( app . Id ! . InstanceId ) ;
3636 } ,
3737 app =>
3838 {
39- Assert . Equal ( "app-app " , app . Name ) ;
39+ Assert . Equal ( "multiple-instance " , app . Name ) ;
4040 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
41- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
41+ Assert . Equal ( "multiple-instance " , app . Id ! . InstanceId ) ;
4242 } ,
4343 app =>
4444 {
45- Assert . Equal ( "app-app-abc " , app . Name ) ;
45+ Assert . Equal ( "multiple-instanceabc " , app . Name ) ;
4646 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
47- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
47+ Assert . Equal ( "multiple-instanceabc " , app . Id ! . InstanceId ) ;
4848 } ,
4949 app =>
5050 {
5151 Assert . Equal ( "singleton" , app . Name ) ;
5252 Assert . Equal ( OtlpApplicationType . Singleton , app . Id ! . Type ) ;
53- Assert . Equal ( "singleton-abc " , app . Id ! . InstanceId ) ;
53+ Assert . Equal ( "singleton-instanceabc " , app . Id ! . InstanceId ) ;
5454 } ) ;
5555
5656 // Act
57- var app = appVMs . GetApplication ( NullLogger . Instance , "app-app-abc " , canSelectGrouping : false , null ! ) ;
57+ var app = appVMs . GetApplication ( NullLogger . Instance , "multiple-instanceabc " , canSelectGrouping : false , null ! ) ;
5858
5959 // Assert
60- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
60+ Assert . Equal ( "multiple-instanceabc " , app . Id ! . InstanceId ) ;
6161 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
6262 }
6363
@@ -67,38 +67,38 @@ public void GetApplication_NameDifferentByCase_Merge()
6767 // Arrange
6868 var appVMs = ApplicationsSelectHelpers . CreateApplications ( new List < OtlpApplication >
6969 {
70- CreateOtlpApplication ( name : "app " , instanceId : "app " ) ,
71- CreateOtlpApplication ( name : "APP " , instanceId : "app-abc " )
70+ CreateOtlpApplication ( name : "name " , instanceId : "instance " ) ,
71+ CreateOtlpApplication ( name : "NAME " , instanceId : "instanceabc " )
7272 } ) ;
7373
7474 Assert . Collection ( appVMs ,
7575 app =>
7676 {
77- Assert . Equal ( "app " , app . Name ) ;
77+ Assert . Equal ( "name " , app . Name ) ;
7878 Assert . Equal ( OtlpApplicationType . ResourceGrouping , app . Id ! . Type ) ;
7979 Assert . Null ( app . Id ! . InstanceId ) ;
8080 } ,
8181 app =>
8282 {
83- Assert . Equal ( "APP-app " , app . Name ) ;
83+ Assert . Equal ( "NAME-instance " , app . Name ) ;
8484 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
85- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
85+ Assert . Equal ( "name-instance " , app . Id ! . InstanceId ) ;
8686 } ,
8787 app =>
8888 {
89- Assert . Equal ( "APP-app-abc " , app . Name ) ;
89+ Assert . Equal ( "NAME-instanceabc " , app . Name ) ;
9090 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
91- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
91+ Assert . Equal ( "name-instanceabc " , app . Id ! . InstanceId ) ;
9292 } ) ;
9393
9494 var testSink = new TestSink ( ) ;
9595 var factory = LoggerFactory . Create ( b => b . AddProvider ( new TestLoggerProvider ( testSink ) ) ) ;
9696
9797 // Act
98- var app = appVMs . GetApplication ( factory . CreateLogger ( "Test" ) , "app-app " , canSelectGrouping : false , null ! ) ;
98+ var app = appVMs . GetApplication ( factory . CreateLogger ( "Test" ) , "name-instance " , canSelectGrouping : false , null ! ) ;
9999
100100 // Assert
101- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
101+ Assert . Equal ( "name-instance " , app . Id ! . InstanceId ) ;
102102 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
103103 Assert . Empty ( testSink . Writes ) ;
104104 }
@@ -148,13 +148,13 @@ public void GetApplication_SelectGroup_NotEnabled_ReturnNull()
148148 {
149149 Assert . Equal ( "app-123" , app . Name ) ;
150150 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
151- Assert . Equal ( "123" , app . Id ! . InstanceId ) ;
151+ Assert . Equal ( "app- 123" , app . Id ! . InstanceId ) ;
152152 } ,
153153 app =>
154154 {
155155 Assert . Equal ( "app-456" , app . Name ) ;
156156 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
157- Assert . Equal ( "456" , app . Id ! . InstanceId ) ;
157+ Assert . Equal ( "app- 456" , app . Id ! . InstanceId ) ;
158158 } ) ;
159159
160160 // Act
@@ -185,13 +185,13 @@ public void GetApplication_SelectGroup_Enabled_ReturnGroup()
185185 {
186186 Assert . Equal ( "app-123" , app . Name ) ;
187187 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
188- Assert . Equal ( "123" , app . Id ! . InstanceId ) ;
188+ Assert . Equal ( "app- 123" , app . Id ! . InstanceId ) ;
189189 } ,
190190 app =>
191191 {
192192 Assert . Equal ( "app-456" , app . Name ) ;
193193 Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
194- Assert . Equal ( "456" , app . Id ! . InstanceId ) ;
194+ Assert . Equal ( "app- 456" , app . Id ! . InstanceId ) ;
195195 } ) ;
196196
197197 // Act
0 commit comments