@@ -22,42 +22,42 @@ public void GetApplication_SameNameAsReplica_GetInstance()
22
22
// Arrange
23
23
var appVMs = ApplicationsSelectHelpers . CreateApplications ( new List < OtlpApplication >
24
24
{
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 " )
28
28
} ) ;
29
29
30
30
Assert . Collection ( appVMs ,
31
31
app =>
32
32
{
33
- Assert . Equal ( "app " , app . Name ) ;
33
+ Assert . Equal ( "multiple " , app . Name ) ;
34
34
Assert . Equal ( OtlpApplicationType . ResourceGrouping , app . Id ! . Type ) ;
35
35
Assert . Null ( app . Id ! . InstanceId ) ;
36
36
} ,
37
37
app =>
38
38
{
39
- Assert . Equal ( "app-app " , app . Name ) ;
39
+ Assert . Equal ( "multiple-instance " , app . Name ) ;
40
40
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
41
- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
41
+ Assert . Equal ( "multiple-instance " , app . Id ! . InstanceId ) ;
42
42
} ,
43
43
app =>
44
44
{
45
- Assert . Equal ( "app-app-abc " , app . Name ) ;
45
+ Assert . Equal ( "multiple-instanceabc " , app . Name ) ;
46
46
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
47
- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
47
+ Assert . Equal ( "multiple-instanceabc " , app . Id ! . InstanceId ) ;
48
48
} ,
49
49
app =>
50
50
{
51
51
Assert . Equal ( "singleton" , app . Name ) ;
52
52
Assert . Equal ( OtlpApplicationType . Singleton , app . Id ! . Type ) ;
53
- Assert . Equal ( "singleton-abc " , app . Id ! . InstanceId ) ;
53
+ Assert . Equal ( "singleton-instanceabc " , app . Id ! . InstanceId ) ;
54
54
} ) ;
55
55
56
56
// 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 ! ) ;
58
58
59
59
// Assert
60
- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
60
+ Assert . Equal ( "multiple-instanceabc " , app . Id ! . InstanceId ) ;
61
61
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
62
62
}
63
63
@@ -67,38 +67,38 @@ public void GetApplication_NameDifferentByCase_Merge()
67
67
// Arrange
68
68
var appVMs = ApplicationsSelectHelpers . CreateApplications ( new List < OtlpApplication >
69
69
{
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 " )
72
72
} ) ;
73
73
74
74
Assert . Collection ( appVMs ,
75
75
app =>
76
76
{
77
- Assert . Equal ( "app " , app . Name ) ;
77
+ Assert . Equal ( "name " , app . Name ) ;
78
78
Assert . Equal ( OtlpApplicationType . ResourceGrouping , app . Id ! . Type ) ;
79
79
Assert . Null ( app . Id ! . InstanceId ) ;
80
80
} ,
81
81
app =>
82
82
{
83
- Assert . Equal ( "APP-app " , app . Name ) ;
83
+ Assert . Equal ( "NAME-instance " , app . Name ) ;
84
84
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
85
- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
85
+ Assert . Equal ( "name-instance " , app . Id ! . InstanceId ) ;
86
86
} ,
87
87
app =>
88
88
{
89
- Assert . Equal ( "APP-app-abc " , app . Name ) ;
89
+ Assert . Equal ( "NAME-instanceabc " , app . Name ) ;
90
90
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
91
- Assert . Equal ( "app-abc " , app . Id ! . InstanceId ) ;
91
+ Assert . Equal ( "name-instanceabc " , app . Id ! . InstanceId ) ;
92
92
} ) ;
93
93
94
94
var testSink = new TestSink ( ) ;
95
95
var factory = LoggerFactory . Create ( b => b . AddProvider ( new TestLoggerProvider ( testSink ) ) ) ;
96
96
97
97
// 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 ! ) ;
99
99
100
100
// Assert
101
- Assert . Equal ( "app " , app . Id ! . InstanceId ) ;
101
+ Assert . Equal ( "name-instance " , app . Id ! . InstanceId ) ;
102
102
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
103
103
Assert . Empty ( testSink . Writes ) ;
104
104
}
@@ -148,13 +148,13 @@ public void GetApplication_SelectGroup_NotEnabled_ReturnNull()
148
148
{
149
149
Assert . Equal ( "app-123" , app . Name ) ;
150
150
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
151
- Assert . Equal ( "123" , app . Id ! . InstanceId ) ;
151
+ Assert . Equal ( "app- 123" , app . Id ! . InstanceId ) ;
152
152
} ,
153
153
app =>
154
154
{
155
155
Assert . Equal ( "app-456" , app . Name ) ;
156
156
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
157
- Assert . Equal ( "456" , app . Id ! . InstanceId ) ;
157
+ Assert . Equal ( "app- 456" , app . Id ! . InstanceId ) ;
158
158
} ) ;
159
159
160
160
// Act
@@ -185,13 +185,13 @@ public void GetApplication_SelectGroup_Enabled_ReturnGroup()
185
185
{
186
186
Assert . Equal ( "app-123" , app . Name ) ;
187
187
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
188
- Assert . Equal ( "123" , app . Id ! . InstanceId ) ;
188
+ Assert . Equal ( "app- 123" , app . Id ! . InstanceId ) ;
189
189
} ,
190
190
app =>
191
191
{
192
192
Assert . Equal ( "app-456" , app . Name ) ;
193
193
Assert . Equal ( OtlpApplicationType . Instance , app . Id ! . Type ) ;
194
- Assert . Equal ( "456" , app . Id ! . InstanceId ) ;
194
+ Assert . Equal ( "app- 456" , app . Id ! . InstanceId ) ;
195
195
} ) ;
196
196
197
197
// Act
0 commit comments