예제 #1
0
        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());
        }
예제 #2
0
 public InstructionExtensionsShould()
 {
     _outputWriter       = new OutputWriterDouble();
     _outputWriterMock   = Substitute.For <IOutputWriter>();
     _assemblyDefinition = DataHelper.SampleAssembly.Value;
 }
예제 #3
0
 public IndentationProviderShould()
 {
     _outputWriterDouble = new OutputWriterDouble();
     _outputWriterMock   = Substitute.For <IOutputWriter>();
 }
 public TypeDefinitionExtensions()
 {
     _assemblyDefinition = DataHelper.SampleAssembly.Value;
     _outputWriter       = new OutputWriterDouble();
 }