Ejemplo n.º 1
0
		public void SingleMethodSolution()
		{
			var code = LoadCode();
			int index;
			code = new CsMembersRemover().RemoveSolution(code, new Label { Name = "Main" }, out index);
			Approvals.Verify(String.Format("solution index: {0}\r\nCode:\r\n{1}", index, code));
		}
Ejemplo n.º 2
0
		private string RemoveRegion(string region, bool onlyBody = false)
		{
			var code = LoadCode();
			IEnumerable<Label> notRemoved;
			code = new CsMembersRemover().Remove(code, new[] { new Label { Name = region, OnlyBody = onlyBody } }, out notRemoved);
			Assert.IsEmpty(notRemoved);
			return code;
		}
Ejemplo n.º 3
0
		private string RemoveRegions(params Label[] regions)
		{
			var code = LoadCode();
			IEnumerable<Label> notRemoved;
			code = new CsMembersRemover().Remove(code, regions, out notRemoved);
			Assert.IsEmpty(notRemoved);
			return code;
		}
        private string RemoveRegions(params Label[] regions)
        {
            var code = LoadCode();
            IEnumerable <Label> notRemoved;

            code = new CsMembersRemover().Remove(code, regions, out notRemoved);
            Assert.IsEmpty(notRemoved);
            return(code);
        }
        public void SingleMethodBodySolution()
        {
            var code = LoadCode();
            int index;

            code = new CsMembersRemover().RemoveSolution(code, new Label {
                Name = "Main", OnlyBody = true
            }, out index);
            Approvals.Verify($"solution index: {index}\r\nCode:\r\n{code}");
        }
Ejemplo n.º 6
0
        public void SingleMethodBodySolution()
        {
            var code = LoadCode();
            int index;

            code = new CsMembersRemover().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 string RemoveRegion(string region, bool onlyBody = false)
        {
            var code = LoadCode();
            IEnumerable <Label> notRemoved;

            code = new CsMembersRemover().Remove(code, new[] { new Label {
                                                                   Name = region, OnlyBody = onlyBody
                                                               } }, out notRemoved);
            Assert.IsEmpty(notRemoved);
            return(code);
        }
        public void RemoveUsings()
        {
            var code = LoadCode();

            Approvals.Verify(CsMembersRemover.RemoveUsings(code));
        }