public void Write_Method_Signature(string className, string fieldName, string expectedIL) { var outputWriter = new OutputWriterDouble(); var type = DataHelper.SampleAssembly.Value.MainModule.Types.FirstOrDefault(x => x.Name == className); var method = type.Fields.FirstOrDefault(x => x.Name == fieldName); method.WriteIL(outputWriter); Assert.Equal(expectedIL, outputWriter.ToString()); }
public InstructionExtensionsShould() { _outputWriter = new OutputWriterDouble(); _outputWriterMock = Substitute.For <IOutputWriter>(); _assemblyDefinition = DataHelper.SampleAssembly.Value; }
public IndentationProviderShould() { _outputWriterDouble = new OutputWriterDouble(); _outputWriterMock = Substitute.For <IOutputWriter>(); }
public TypeDefinitionExtensions() { _assemblyDefinition = DataHelper.SampleAssembly.Value; _outputWriter = new OutputWriterDouble(); }