public void SingleMethodSolutionBody() { var code = LoadCode(); int index; code = new RegionRemover("cs").RemoveSolution(code, new Label { Name = "Main", OnlyBody = true}, out index); Approvals.Verify(String.Format("solution index: {0}\r\nCode:\r\n{1}", index, code)); }
private static string RemoveRegions(string langId, params Label[] regions) { var code = LoadCode(); IEnumerable<Label> notRemoved; code = new RegionRemover(langId).Remove(code, regions, out notRemoved); Assert.IsEmpty(notRemoved); return code; }
private static string RemoveRegion(string region, bool onlyBody = false, string langId = "cs") { var code = LoadCode(); IEnumerable<Label> notRemoved; code = new RegionRemover(langId).Remove(code, new[] { new Label { Name = region, OnlyBody = onlyBody } }, out notRemoved); Assert.IsEmpty(notRemoved); return code; }
private static string RemoveRegions(string langId, params Label[] regions) { var code = LoadCode(); IEnumerable <Label> notRemoved; code = new RegionRemover(langId).Remove(code, regions, out notRemoved); Assert.IsEmpty(notRemoved); return(code); }
public void SingleMethodSolutionBody() { var code = LoadCode(); int index; code = new RegionRemover("cs").RemoveSolution(code, new Label { Name = "Main", OnlyBody = true }, out index); Approvals.Verify(String.Format("solution index: {0}\r\nCode:\r\n{1}", index, code)); }
public void SingleRegionSolution() { var code = LoadCode(); int index; code = new RegionRemover("cs").RemoveSolution(code, new Label { Name = "methods_2_and_3" }, out index); Approvals.Verify(String.Format("solution index: {0}\r\nCode:\r\n{1}", index, code)); }
private static string RemoveRegion(string region, bool onlyBody = false, string langId = "cs") { var code = LoadCode(); IEnumerable <Label> notRemoved; code = new RegionRemover(langId).Remove(code, new[] { new Label { Name = region, OnlyBody = onlyBody } }, out notRemoved); Assert.IsEmpty(notRemoved); return(code); }