33using System . Diagnostics . Metrics ;
44using Csla . Server ;
55using Csla . Server . Dashboard ;
6+ using Csla . TestHelpers ;
67using Microsoft . VisualStudio . TestTools . UnitTesting ;
78
89namespace Csla . Test . DataPortal
910{
1011 [ TestClass ]
1112 public class OpenTelemetryDashboardTests
1213 {
14+ private static TestDIContext _testDIContext ;
15+
16+ [ ClassInitialize ]
17+ public static void ClassInitialize ( TestContext context )
18+ {
19+ _testDIContext = TestDIContextFactory . CreateDefaultContext ( ) ;
20+ }
1321 [ TestMethod ]
1422 public void OpenTelemetryDashboard_CanInstantiate ( )
1523 {
@@ -45,7 +53,8 @@ public void OpenTelemetryDashboard_TracksCompleteCall_Success()
4553 {
4654 // Arrange
4755 using var dashboard = new OpenTelemetryDashboard ( ) ;
48- var result = new DataPortalResult ( ) ;
56+ var applicationContext = _testDIContext . CreateTestApplicationContext ( ) ;
57+ var result = new Server . DataPortalResult ( applicationContext ) ;
4958 var args = new InterceptArgs (
5059 typeof ( string ) ,
5160 null ,
@@ -107,6 +116,7 @@ public void OpenTelemetryDashboard_MultipleCallsTracked()
107116 {
108117 // Arrange
109118 using var dashboard = new OpenTelemetryDashboard ( ) ;
119+ var applicationContext = _testDIContext . CreateTestApplicationContext ( ) ;
110120
111121 // Act - Initialize multiple calls
112122 for ( int i = 0 ; i < 5 ; i ++ )
@@ -122,7 +132,7 @@ public void OpenTelemetryDashboard_MultipleCallsTracked()
122132 // Complete 3 successfully
123133 for ( int i = 0 ; i < 3 ; i ++ )
124134 {
125- var result = new DataPortalResult ( ) ;
135+ var result = new Server . DataPortalResult ( applicationContext ) ;
126136 var completeArgs = new InterceptArgs (
127137 typeof ( string ) ,
128138 null ,
0 commit comments