Ejemplo n.º 1
0
        public void InjectionSanity()
        {
            ReadOnlyCollection <CodeInstruction> beforeInstructions = PatchTestHelper.GetInstructionsFromMethod(BuilderTool_HandleInput_Patch.TARGET_METHOD);
            IEnumerable <CodeInstruction>        result             = BuilderTool_HandleInput_Patch.Transpiler(BuilderTool_HandleInput_Patch.TARGET_METHOD, beforeInstructions);

            Assert.IsTrue(beforeInstructions.Count < result.Count());
        }
Ejemplo n.º 2
0
        public void Sanity()
        {
            List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100);

            instructions.Add(new CodeInstruction(BuilderTool_HandleInput_Patch.INJECTION_OPCODE, BuilderTool_HandleInput_Patch.INJECTION_OPERAND));

            IEnumerable <CodeInstruction> result = BuilderTool_HandleInput_Patch.Transpiler(BuilderTool_HandleInput_Patch.TARGET_METHOD, instructions);

            Assert.AreEqual(instructions.Count + 5, result.Count());
        }