public void TestMapping_ParameterLess_Method()
        {
            var methodElementsFinder = new FakeInstanceMethodElementFinder(NewMethodName, new[] { InstancePointer });
            var mapper = new InstanceMethodMapper(_parentClass, methodElementsFinder);

            var mappedMethod     = mapper.GetMappedItem();
            var mappedMethodName = mappedMethod.Name;

            Assert.AreEqual(NewMethodName, mappedMethodName);
            Assert.IsFalse(mappedMethod.IsStatic);
            Assert.IsTrue(mappedMethod.HasInstancePointer());
        }
        public void TestMapping_Method_WithParameters()
        {
            var methodElementsFinder =
                new FakeInstanceMethodElementFinder(NewMethodName, new[] { InstancePointer, ParameterName });
            var mapper = new InstanceMethodMapper(_parentClass, methodElementsFinder);

            var mappedMethod          = mapper.GetMappedItem();
            var mappedParameters      = mappedMethod.Parameters.Select(a => a.Name).ToList();
            var mappedInstancePointer = mappedMethod.InstancePointer.Name;

            CollectionAssert.Contains(mappedParameters, ParameterName);
            CollectionAssert.DoesNotContain(mappedParameters, InstancePointer);
            Assert.AreEqual(InstancePointer, mappedInstancePointer);
        }
        public void TestClass_MethodMap()
        {
            const string newMethodName   = "newMethod";
            const string instancePointer = "InstancePointer";

            var methodElementsFinder = new FakeInstanceMethodElementFinder(newMethodName, new[] { instancePointer });
            var elementFinder        = new FakeClassElementFinder(NewClassName, new[] { methodElementsFinder });

            var mapper            = new ClassMapper(elementFinder);
            var mappedClass       = mapper.GetMappedItem();
            var mappedMethods     = mappedClass.Methods.FirstOrDefault();
            var mappedMethodsName = mappedMethods.Name;

            Assert.AreEqual(newMethodName, mappedMethodsName);
        }