BananaHook.Specs.Infrastructure.describe_Patch.when_applying C# (CSharp) Method

when_applying() private method

private when_applying ( ) : void
return void
        void when_applying()
        {
            act = () => patch.Apply();

            it["should replace the bytes"] = () => memory.ReadBytes(buffer, 4).should_be(replaceWith);
            it["should be applied"] = () => patch.IsApplied.should_be_true();

            context["when removed"] = () =>
            {
                act = () => patch.Remove();

                it["should restore the original bytes"] = () => memory.ReadBytes(buffer, 4).should_be(new[] { 0, 0, 0, 0 });
                it["should not be applied"] = () => patch.IsApplied.should_be_false();
            };
        }