public void GetDomRegion() { MockMethod method = new MockMethod(); DomRegion bodyRegion = new DomRegion(0, 4, 1, 4); method.BodyRegion = bodyRegion; DomRegion expectedRegion = new DomRegion(bodyRegion.BeginLine + 1, 1, bodyRegion.EndLine + 1, 1); Assert.AreEqual(expectedRegion, PythonDesignerGenerator.GetBodyRegionInDocument(method)); }
public void GetMethodReplaceRegion() { MockMethod method = new MockMethod(MockClass.CreateMockClassWithoutAnyAttributes()); DomRegion bodyRegion = new DomRegion(0, 4, 1, 4); method.BodyRegion = bodyRegion; DomRegion expectedRegion = new DomRegion(bodyRegion.BeginLine + 1, 1, bodyRegion.EndLine + 1, 1); DomRegion region = generator.GetBodyRegionInDocument(method); Assert.AreEqual(expectedRegion, region); }