InteropTests.cs 708 B

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