Upsilon/UpsilonTests/TestClass.cs

41 lines
1006 B
C#
Raw Normal View History

2018-11-23 11:55:28 +00:00
using System.Collections.Generic;
using Upsilon.BaseTypes;
using Upsilon.Binder;
using Upsilon.Evaluator;
using Upsilon.StandardLibraries;
using Xunit;
namespace UpsilonTests
{
[Collection("collection")]
public abstract class TestClass
{
public EvaluationScope StaticScope { get; }
public BoundScope BoundScope { get; }
2018-11-23 11:55:28 +00:00
public TestClass(StaticScriptFixture fix)
{
StaticScope = fix.StaticScope;
BoundScope = fix.BoundScope;
2018-11-23 11:55:28 +00:00
}
}
[CollectionDefinition("collection")]
public class StaticScriptContext : ICollectionFixture<StaticScriptFixture>
{
}
public class StaticScriptFixture
{
public EvaluationScope StaticScope { get; }
public BoundScope BoundScope { get; }
public StaticScriptFixture()
{
var (evaluationScope, boundScope) = StandardLibrary.Create();
StaticScope = evaluationScope;
BoundScope = boundScope;
}
}
}