using Upsilon; using Upsilon.Binder; using Upsilon.Evaluator; using Xunit; namespace UpsilonTests { [Collection("collection")] public abstract class TestClass { protected EvaluationScope StaticScope { get; } protected BoundScope BoundScope { get; } protected ScriptOptions Options { get; } protected TestClass(StaticScriptFixture fix) { StaticScope = fix.StaticScope; BoundScope = fix.BoundScope; Options = new ScriptOptions() { OverrideStaticScope = StaticScope, OverrideStaticBoundScope = BoundScope, }; } } [CollectionDefinition("collection")] public class StaticScriptContext : ICollectionFixture { } public class StaticScriptFixture { public EvaluationScope StaticScope { get; } public BoundScope BoundScope { get; } public StaticScriptFixture() { var (evaluationScope, boundScope) = Upsilon.StandardLibraries.StaticScope.CreateStandardLibrary(); StaticScope = evaluationScope; BoundScope = boundScope; } } }