Exemple #1
0
        public void Test_BoxingValueResults()
        {
            var struct1 = Class20.Method20();

            Assert.AreEqual(123, struct1.value);

            var harmony   = new Harmony("test");
            var processor = new PatchClassProcessor(harmony, typeof(Class20Patch));
            var patches   = processor.Patch();

            Assert.NotNull(patches, "patches");
            Assert.AreEqual(1, patches.Count);

            _ = Class20.Method20();
            var result = (Class20.Struct20)Class20Patch.theResult;

            Assert.AreEqual(123, result.value);
        }