MVE:
// Classes
abstract class AbstractBase
{
public virtual T GetTFromAbstractBase<T>(string input) where T : class => null;
}
class DerivedFromAbstractBase : AbstractBase {}
// Test
var shim = Shim
.Replace(() => Is.A<AbstractBase>().GetTFromAbstractBase<string>(Is.A<string>()))
.With((AbstractBase @this, string @string) => "Hello");
PoseContext.Isolate(() =>
{
var instance = new DerivedFromAbstractBase();
var result = instance.GetTFromAbstractBase<string>("");
},
shim
);
Rewriting GetTFromAbstractBase results in System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B).
This issue was discovered during #34
MVE:
Rewriting
GetTFromAbstractBaseresults inSystem.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B).This issue was discovered during #34