public void Init() { helper = new ClassHelper(); document = MockRepository.GenerateStub<IRefactoringDocument>(); documentView = MockRepository.GenerateStub<IRefactoringDocumentView>(); documentLoader = MockRepository.GenerateStub<IDocumentLoader>(); fakeCodeGenerator = helper.CompilationUnitHelper.FakeCodeGenerator; }
void CreateProjectContent() { helper = new ClassHelper(); }
ClassHelper CreateClassHelper(string name) { var helper = new ClassHelper(); helper.CreateClass(name); return helper; }
public void Init() { helper = new ReturnTypeHelper(); classHelper = new ClassHelper(); parent = new CodeElement(); }
void ReturnTypeUsesDifferentProjectContent() { classHelper = new ClassHelper(); classHelper.ProjectContentHelper.SetProjectForProjectContent(ProjectHelper.CreateTestProject()); }
public void Init() { classHelper = new ClassHelper(); document = MockRepository.GenerateStub<IRefactoringDocument>(); documentLoader = MockRepository.GenerateStub<IDocumentLoader>(); }
public void Type_PropertyTypeExistsInProject_TypeRefTypeInfoLocationIsProject() { helper.CreatePublicProperty("MyProperty"); helper.SetPropertyReturnType("MyType"); helper.CreateProjectForProjectContent(); var classHelper = new ClassHelper(); classHelper.CreateClass("MyType"); classHelper.SetProjectForProjectContent(helper.Project); helper.ReturnTypeHelper.AddUnderlyingClass(classHelper.Class); CreateCodeProperty2(); CodeTypeRef typeRef = property.Type; vsCMInfoLocation location = typeRef.CodeType.InfoLocation; Assert.AreEqual(vsCMInfoLocation.vsCMInfoLocationProject, location); }
public void Type_PropertyTypeIsSystemString_TypeRefTypeInfoLocationIsExternal() { helper.CreatePublicProperty("MyProperty"); helper.SetPropertyReturnType("System.String"); helper.CreateProjectForProjectContent(); var classHelper = new ClassHelper(); classHelper.CreateClass("System.String"); classHelper.SetProjectForProjectContent(null); helper.ReturnTypeHelper.AddUnderlyingClass(classHelper.Class); CreateCodeProperty2(); CodeTypeRef typeRef = property.Type; vsCMInfoLocation location = typeRef.CodeType.InfoLocation; Assert.AreEqual(vsCMInfoLocation.vsCMInfoLocationExternal, location); }
ClassHelper CreateClassHelperWithPublicClass(string name) { var classHelper = new ClassHelper(); classHelper.CreatePublicClass(name); return classHelper; }
public void Init() { helper = new ClassHelper(); }