Ejemplo n.º 1
0
        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>() }));
        }
Ejemplo n.º 2
0
        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>() }));
        }