InteropTests.cs 637 B

1234567891011121314151617181920212223
  1. using System.Reflection;
  2. namespace Jint.Tests.PublicInterface;
  3. public partial class InteropTests : IDisposable
  4. {
  5. private readonly Engine _engine;
  6. public InteropTests()
  7. {
  8. _engine = new Engine(cfg => cfg.AllowClr(
  9. typeof(Console).GetTypeInfo().Assembly,
  10. typeof(File).GetTypeInfo().Assembly))
  11. .SetValue("log", new Action<object>(Console.WriteLine))
  12. .SetValue("assert", new Action<bool>(Assert.True))
  13. .SetValue("equal", new Action<object, object>(Assert.Equal))
  14. ;
  15. }
  16. void IDisposable.Dispose()
  17. {
  18. }
  19. }