File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ import System.IO
44import System.Text
55import Microsoft.VisualStudio.TestTools.UnitTesting
66import System.Diagnostics
7+ import CodeGen.RepositoryAPI
78
89namespace UnitTests
910
1011 {TestClass}
1112 public class EnvironmentConfig
1213
14+ public static Repository, @Repository
15+
1316 {AssemblyInitialize}
1417 public static method AssemblyInitialize, void
1518 context, @TestContext
@@ -18,6 +21,7 @@ namespace UnitTests
1821 xcall setlog("RPSMFIL","..\..\SampleRepository\rpsmain.ism",sts)
1922 xcall setlog("RPSTFIL","..\..\SampleRepository\rpstext.ism",sts)
2023 xcall setlog("CODEGEN_EXE",".",sts)
24+ Repository = new Repository("..\..\SampleRepository\rpsmain.ism","..\..\SampleRepository\rpstext.ism")
2125 endmethod
2226
2327 endclass
Original file line number Diff line number Diff line change @@ -18,23 +18,23 @@ namespace UnitTests
1818
1919 public method Simulate
2020 required in structureName, String
21- endparams
2221 proc
23-
2422 Environment.SetEnvironmentVariable("CODEGEN_EXE",Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(^typeof(CodeGenerator)).Location))
2523
26- str = new RpsStructure(context.Repository,structureName)
27-
2824 taskset = new CodeGenTaskSet()
2925 task = new CodeGenTask()
3026 task.Structures.Add(structureName)
3127 taskset.Tasks.Add(task)
3228
33- context = new CodeGenContext(taskset)
29+ context = new CodeGenContext(taskset)
30+ context.Repository = EnvironmentConfig.Repository
3431 context.CurrentTask = task
3532 context.StructureFileIndex = new int[1]
3633 context.StructureFileIndex[0] = 0
3734 context.CurrentFileIndex = 0
35+
36+ str = new RpsStructure(context.Repository,structureName)
37+
3838 context.SetCurrentStructure(str)
3939
4040 context.UserTokens = new List<UserToken>()
You can’t perform that action at this time.
0 commit comments