Exemplo n.º 1
0
        public void AssertIt(AssemblyDefinition assembly)
        {
            Instruction     current   = ReflectionServices.FindInstruction(assembly, _testTypeName, _methodName, OpCodes.Newobj);
            MethodReference foundCtor = TACollectionsTestCaseBase.ConstructorFor(TACollectionsTestCaseBase.Import(assembly, _type), _parameterTypes);

            Assert.IsNotNull(foundCtor, string.Format("Constructor not found. Type = {0} / Parameters = {1}", _type, _parameterTypes.Aggregate("", (acc, curr) => acc + curr.Name + ", ")));
            TACollectionsTestCaseBase.AssertInstruction(current, OpCodes.Newobj, foundCtor);
        }
Exemplo n.º 2
0
        public void AssertIt(AssemblyDefinition assembly)
        {
            Instruction     current   = ReflectionServices.FindInstruction(assembly, _testTypeName, _methodName, OpCodes.Newobj);
            MethodReference foundCtor = TACollectionsTestCaseBase.ContructorFor(TACollectionsTestCaseBase.Import(assembly, _type), _parameterTypes);

            Assert.IsNotNull(foundCtor);
            TACollectionsTestCaseBase.AssertInstruction(current, OpCodes.Newobj, foundCtor);
        }