|
10 | 10 |
|
11 | 11 | using JavaScriptEngineSwitcher.Tests.Interop; |
12 | 12 | using JavaScriptEngineSwitcher.Tests.Interop.Animals; |
13 | | -using JavaScriptEngineSwitcher.Tests.Interop.Logging; |
14 | 13 |
|
15 | 14 | namespace JavaScriptEngineSwitcher.Tests.Jint |
16 | 15 | { |
@@ -463,43 +462,6 @@ string TestAllowReflectionSetting(bool allowReflection) |
463 | 462 |
|
464 | 463 | #endregion |
465 | 464 |
|
466 | | - #region Types with fields |
467 | | - |
468 | | - [Fact] |
469 | | - public override void EmbeddingOfCustomReferenceTypeWithField() |
470 | | - { |
471 | | - // Arrange |
472 | | - Type defaultLoggerType = typeof(DefaultLogger); |
473 | | - Type throwExceptionLoggerType = typeof(ThrowExceptionLogger); |
474 | | - const string updateCode = @"var oldLogger = DefaultLogger.Current; |
475 | | -DefaultLogger.Current = new ThrowExceptionLogger();"; |
476 | | - const string rollbackCode = "DefaultLogger.Current = oldLogger;"; |
477 | | - |
478 | | - const string input = "DefaultLogger.Current"; |
479 | | - const string targetOutput = "[throw exception logger]"; |
480 | | - |
481 | | - // Act |
482 | | - string output; |
483 | | - |
484 | | - using (var jsEngine = CreateJsEngine()) |
485 | | - { |
486 | | - jsEngine.EmbedHostType("DefaultLogger", defaultLoggerType); |
487 | | - jsEngine.EmbedHostType("ThrowExceptionLogger", throwExceptionLoggerType); |
488 | | - |
489 | | - lock (DefaultLogger.SyncRoot) |
490 | | - { |
491 | | - jsEngine.Execute(updateCode); |
492 | | - output = jsEngine.Evaluate<string>(input); |
493 | | - jsEngine.Execute(rollbackCode); |
494 | | - } |
495 | | - } |
496 | | - |
497 | | - // Assert |
498 | | - Assert.Equal(targetOutput, output); |
499 | | - } |
500 | | - |
501 | | - #endregion |
502 | | - |
503 | 465 | #region Types with methods |
504 | 466 |
|
505 | 467 | [Fact] |
|
0 commit comments