상속: IObfuscationMethod
예제 #1
0
 public void IgnoresAccessibility()
 {
     var target = GetTarget("String");
     var obfuscator = new StringObfuscator();
     Assert.IsTrue(obfuscator.Process(target));
     Assert.Contains("Public", obfuscator.FoundStrings, "Missed public accessibility");
     Assert.Contains("Private", obfuscator.FoundStrings, "Missed private accessibility");
     Assert.Contains("Protected", obfuscator.FoundStrings, "Missed protected accessibility");
     Assert.Contains("Internal", obfuscator.FoundStrings, "Missed internal accessibility");
 }
예제 #2
0
        public void DoesNotCorruptBranches()
        {
            var targetGenerator = new BranchesTestTarget();
            var target = targetGenerator.Generate();
            var sizeBefore = targetGenerator.EntryMethod.Body.Instructions.Count;

            var obfuscator = new StringObfuscator();
            Assert.IsTrue(obfuscator.Process(target));

            var sizeAfter = targetGenerator.EntryMethod.Body.Instructions.Count;
            Assert.Greater(sizeAfter, sizeBefore);

            BranchHelper.VerifyBranches(targetGenerator.EntryMethod);
        }
예제 #3
0
 public void ProcessesTestTarget()
 {
     var target = GetTarget("String");
     var obfuscator = new StringObfuscator();
     Assert.IsTrue(obfuscator.Process(target));
 }