public CSharpToGlueMapperTests(ITestOutputHelper testOutputHelper) { _TestOutputHelper = testOutputHelper; _Cacher = Substitute.For <ISessionCache>(); _Cacher.When(c => c.CacheFromCSharpValue(Arg.Any <object>(), Arg.Any <IJsCsGlue>())) .Do(callInfo => _Cache.Add(callInfo[0], (IJsCsGlue)callInfo[1])); _Cacher.GetCached(Arg.Any <object>()).Returns(callInfo => _Cache.GetOrDefault(callInfo[0])); _ObjectChangesListener = new ObjectChangesListener(_ => { }, _ => { }, _ => { }, _ => { }); _GlueFactory = new GlueFactory(null, _Cacher, null, _ObjectChangesListener); _Logger = Substitute.For <IWebSessionLogger>(); _CSharpToGlueMapper = new CSharpToGlueMapper(_Cacher, _GlueFactory, _Logger); }