Exemple #1
0
        public void MimicBuild()
        {
            var type = MimicBuilder.Create <ITestInterface, MockImpl>();

            Assert.NotNull(type);
            Assert.Equal(type.Name, "ITestInterfaceMimic");
        }
Exemple #2
0
        public void MimicConstructed()
        {
            var type    = MimicBuilder.Create <ITestInterface, MockImpl>();
            var tiMimic = (ITestInterface)Activator.CreateInstance(type, new MockImpl());

            foreach (var methodInfo in typeof(ITestInterface).GetMethods())
            {
                // TODO: check also params types
                Assert.NotNull(tiMimic.GetType().GetMethod(methodInfo.Name));
            }
        }