示例#1
0
		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));
		}
示例#2
0
		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;
		}
示例#3
0
		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);
        }
示例#8
0
		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));
		}