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()); }
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()); }