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"); }
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); }
public void ProcessesTestTarget() { var target = GetTarget("String"); var obfuscator = new StringObfuscator(); Assert.IsTrue(obfuscator.Process(target)); }