public void Init() { method = MockMethod.CreateMockMethodWithoutAnyAttributes(); method.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; int methodBeginLine = 3; // 1 based. int methodBeginColumn = 6; // 1 based. method.Region = new DomRegion(methodBeginLine, methodBeginColumn); treeView = new MockTestTreeView(); treeView.SelectedMember = method; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void Init() { MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); c.CompilationUnit.FileName = @"c:\projects\mytest.cs"; int beginLine = 3; // 1 based. int beginColumn = 6; // 1 based. c.Region = new DomRegion(beginLine, beginColumn); treeView = new MockTestTreeView(); treeView.SelectedClass = c; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void Init() { baseClassMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); baseClassMethod.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; MockClass derivedClass = MockClass.CreateMockClassWithoutAnyAttributes(); derivedClass.CompilationUnit.FileName = @"d:\projects\myderivedtestclass.cs"; int methodBeginLine = 3; // 1 based. int methodBeginColumn = 6; // 1 based. baseClassMethod.Region = new DomRegion(methodBeginLine, methodBeginColumn); BaseTestMember baseTestMethod = new BaseTestMember(derivedClass, baseClassMethod); treeView = new MockTestTreeView(); treeView.SelectedMember = baseTestMethod; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void ExceptionNotThrownWhenSelectedTestTreeMethodIsNull() { treeView.SelectedMember = null; Assert.DoesNotThrow(delegate { gotoDefinitionCommand.Run(); }); }