@@ -108,6 +108,38 @@ public override void EmbeddingOfInstanceOfBuiltinValueTypeWithProperties()
108108 public override void EmbeddingOfInstanceOfCustomValueTypeWithProperties ( )
109109 { }
110110
111+ [ Fact ]
112+ public override void EmbeddingOfInstanceOfCustomReferenceTypeWithProperties ( )
113+ {
114+ // Arrange
115+ var person = new Person ( "Vanya" , "Ivanov" ) ;
116+ const string updateCode = @"person.LastName = person.LastName.substr(0, 5) + 'ff';
117+ person.Patronymic = '';" ;
118+
119+ const string input1 = "person.FirstName" ;
120+ const string targetOutput1 = "Vanya" ;
121+
122+ const string input2 = "person.LastName" ;
123+ const string targetOutput2 = "Ivanoff" ;
124+
125+ // Act
126+ string output1 ;
127+ string output2 ;
128+
129+ using ( var jsEngine = CreateJsEngine ( ) )
130+ {
131+ jsEngine . EmbedHostObject ( "person" , person ) ;
132+ jsEngine . Execute ( updateCode ) ;
133+
134+ output1 = jsEngine . Evaluate < string > ( input1 ) ;
135+ output2 = jsEngine . Evaluate < string > ( input2 ) ;
136+ }
137+
138+ // Assert
139+ Assert . Equal ( targetOutput1 , output1 ) ;
140+ Assert . Equal ( targetOutput2 , output2 ) ;
141+ }
142+
111143 #endregion
112144
113145 #region Objects with methods
@@ -437,12 +469,6 @@ public override void CreatingAnInstanceOfEmbeddedCustomExceptionAndCallingOfItsG
437469
438470 #region Types with fields
439471
440- #if NET9_0_OR_GREATER
441- [ Fact ]
442- public override void EmbeddingOfBuiltinValueTypeWithField ( )
443- { }
444-
445- #endif
446472 [ Fact ]
447473 public override void EmbeddingOfCustomReferenceTypeWithField ( )
448474 {
0 commit comments