public void Default_Convention_Test() { var pairs = GooseTypePairs.Scan(options => { options.FromAssemblyOf <Duck>().ToAssemblyOf <Duck>().WithDefaultConvention(); }); Assert.True(CheckPairs(pairs, new GooseTypePair[] { GooseTypePair.Create <Duck, IDuck>() })); }
public void Convention_Test() { var pairs = GooseTypePairs.Scan(options => { options.FromAssemblyOf <Duck>().ToAssemblyOf <Duck>().WithConvention((sourceType, targetType) => targetType.Name == "IStandard" + sourceType.Name); }); Assert.True(CheckPairs(pairs, new GooseTypePair[] { GooseTypePair.Create <Fish, IStandardFish>() })); }