Пример #1
0
        public void InjectionSanity()
        {
            ReadOnlyCollection <CodeInstruction> beforeInstructions = PatchTestHelper.GetInstructionsFromMethod(Equipment_RemoveItem_Patch.TARGET_METHOD);
            IEnumerable <CodeInstruction>        result             = Equipment_RemoveItem_Patch.Transpiler(Equipment_RemoveItem_Patch.TARGET_METHOD, beforeInstructions);

            Assert.IsTrue(beforeInstructions.Count < result.Count());
        }
Пример #2
0
        public void Sanity()
        {
            List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100);

            instructions.Add(new CodeInstruction(Equipment_RemoveItem_Patch.INJECTION_OPCODE));

            IEnumerable <CodeInstruction> result = Equipment_RemoveItem_Patch.Transpiler(null, instructions);

            Assert.AreEqual(108, result.Count());
        }