@@ -203,24 +203,15 @@ public void ShouldSupportInlineNugetReferencesWithTrailingSemicoloninEvaluatedCo
203
203
[ Fact ]
204
204
public static void ShouldHandleIssue235 ( )
205
205
{
206
- var code = @"#r ""nuget: AgileObjects.AgileMapper, 0.23.0""
207
- using AgileObjects.AgileMapper;
208
- public class TestClass
209
- {
210
- public TestClass()
211
- {
212
- IMapper mapper = Mapper.CreateNew();
213
- }
214
- }" ;
215
206
var logger = new ScriptLogger ( Console . Error , true ) ;
216
207
var runtimeDependencyResolver = new RuntimeDependencyResolver ( type => ( ( level , message ) => { } ) ) ;
217
208
var compiler = new ScriptCompiler ( logger , runtimeDependencyResolver ) ;
218
209
//Copied from Execute(string fixture, params string[] arguments)
219
210
//Probably there should be a better place for this
220
211
var workingDirectory = Path . Combine ( Directory . GetCurrentDirectory ( ) , ".." , ".." , ".." , "TestFixtures" , "Issue235" ) ;
221
- var scriptContext = new ScriptContext ( SourceText . From ( code ) , workingDirectory , Enumerable . Empty < string > ( ) , scriptMode : ScriptMode . REPL ) ;
212
+ var scriptContext = new ScriptContext ( SourceText . From ( File . ReadAllText ( Path . Combine ( workingDirectory , "TestClass.csx" ) ) ) , workingDirectory , Enumerable . Empty < string > ( ) , scriptMode : ScriptMode . REPL ) ;
222
213
var compilationResult = compiler . CreateCompilationContext < object , InteractiveScriptGlobals > ( scriptContext ) ;
223
- using ( var ms = File . OpenWrite ( Path . Combine ( workingDirectory , "Issue235 .dll" ) ) )
214
+ using ( var ms = File . OpenWrite ( Path . Combine ( workingDirectory , "TestClass .dll" ) ) )
224
215
{
225
216
compilationResult . Script . GetCompilation ( ) . Emit ( ms ) ;
226
217
}
0 commit comments