@@ -11,7 +11,7 @@ public class ComponentApplicationStateTest
11
11
public void InitializeExistingState_SetupsState ( )
12
12
{
13
13
// Arrange
14
- var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < RegistrationContext > ( ) ) ;
14
+ var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < PersistComponentStateRegistration > ( ) ) ;
15
15
var existingState = new Dictionary < string , byte [ ] >
16
16
{
17
17
[ "MyState" ] = JsonSerializer . SerializeToUtf8Bytes ( new byte [ ] { 1 , 2 , 3 , 4 } )
@@ -29,7 +29,7 @@ public void InitializeExistingState_SetupsState()
29
29
public void InitializeExistingState_ThrowsIfAlreadyInitialized ( )
30
30
{
31
31
// Arrange
32
- var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < RegistrationContext > ( ) ) ;
32
+ var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < PersistComponentStateRegistration > ( ) ) ;
33
33
var existingState = new Dictionary < string , byte [ ] >
34
34
{
35
35
[ "MyState" ] = new byte [ ] { 1 , 2 , 3 , 4 }
@@ -45,7 +45,7 @@ public void InitializeExistingState_ThrowsIfAlreadyInitialized()
45
45
public void TryRetrieveState_ReturnsStateWhenItExists ( )
46
46
{
47
47
// Arrange
48
- var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < RegistrationContext > ( ) ) ;
48
+ var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < PersistComponentStateRegistration > ( ) ) ;
49
49
var existingState = new Dictionary < string , byte [ ] >
50
50
{
51
51
[ "MyState" ] = JsonSerializer . SerializeToUtf8Bytes ( new byte [ ] { 1 , 2 , 3 , 4 } )
@@ -65,7 +65,7 @@ public void PersistState_SavesDataToTheStoreAsync()
65
65
{
66
66
// Arrange
67
67
var currentState = new Dictionary < string , byte [ ] > ( ) ;
68
- var applicationState = new PersistentComponentState ( currentState , new List < RegistrationContext > ( ) )
68
+ var applicationState = new PersistentComponentState ( currentState , new List < PersistComponentStateRegistration > ( ) )
69
69
{
70
70
PersistingState = true
71
71
} ;
@@ -84,7 +84,7 @@ public void PersistState_ThrowsForDuplicateKeys()
84
84
{
85
85
// Arrange
86
86
var currentState = new Dictionary < string , byte [ ] > ( ) ;
87
- var applicationState = new PersistentComponentState ( currentState , new List < RegistrationContext > ( ) )
87
+ var applicationState = new PersistentComponentState ( currentState , new List < PersistComponentStateRegistration > ( ) )
88
88
{
89
89
PersistingState = true
90
90
} ;
@@ -101,7 +101,7 @@ public void PersistAsJson_SerializesTheDataToJsonAsync()
101
101
{
102
102
// Arrange
103
103
var currentState = new Dictionary < string , byte [ ] > ( ) ;
104
- var applicationState = new PersistentComponentState ( currentState , new List < RegistrationContext > ( ) )
104
+ var applicationState = new PersistentComponentState ( currentState , new List < PersistComponentStateRegistration > ( ) )
105
105
{
106
106
PersistingState = true
107
107
} ;
@@ -120,7 +120,7 @@ public void PersistAsJson_NullValueAsync()
120
120
{
121
121
// Arrange
122
122
var currentState = new Dictionary < string , byte [ ] > ( ) ;
123
- var applicationState = new PersistentComponentState ( currentState , new List < RegistrationContext > ( ) )
123
+ var applicationState = new PersistentComponentState ( currentState , new List < PersistComponentStateRegistration > ( ) )
124
124
{
125
125
PersistingState = true
126
126
} ;
@@ -140,7 +140,7 @@ public void TryRetrieveFromJson_DeserializesTheDataFromJson()
140
140
var myState = new byte [ ] { 1 , 2 , 3 , 4 } ;
141
141
var serialized = JsonSerializer . SerializeToUtf8Bytes ( myState ) ;
142
142
var existingState = new Dictionary < string , byte [ ] > ( ) { [ "MyState" ] = serialized } ;
143
- var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < RegistrationContext > ( ) ) ;
143
+ var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < PersistComponentStateRegistration > ( ) ) ;
144
144
145
145
applicationState . InitializeExistingState ( existingState ) ;
146
146
@@ -158,7 +158,7 @@ public void TryRetrieveFromJson_NullValue()
158
158
// Arrange
159
159
var serialized = JsonSerializer . SerializeToUtf8Bytes < byte [ ] > ( null ) ;
160
160
var existingState = new Dictionary < string , byte [ ] > ( ) { [ "MyState" ] = serialized } ;
161
- var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < RegistrationContext > ( ) ) ;
161
+ var applicationState = new PersistentComponentState ( new Dictionary < string , byte [ ] > ( ) , new List < PersistComponentStateRegistration > ( ) ) ;
162
162
163
163
applicationState . InitializeExistingState ( existingState ) ;
164
164
0 commit comments