private void TestGetRelativeDirectoryPath(string basePath, string directoryPath, string expectedPath) { // This function should have been static, but it can't be changed now. PropPageUserControlBase page = new PropPageUserControlBase(); Microsoft_VisualStudio_Editors_PropertyPages_PropPageUserControlBaseAccessor accessor = new Microsoft_VisualStudio_Editors_PropertyPages_PropPageUserControlBaseAccessor(page); string result = accessor.GetRelativeDirectoryPath(basePath, directoryPath); Assert.AreEqual(expectedPath, result); }
public void InitializePageForUnitTests(PropPageUserControlBase page, BeforeSetObjectsDelegate beforeSetObjects) { if (Fake_dte == null) { Fake_dte = new DTEFake(); } if (Fake_hierarchy == null) { Fake_hierarchy = new VsHierarchyFake(Fake_dte); } if (Fake_propertyPageSiteOwner == null) { Fake_propertyPageSiteOwner = new PropertyPageSiteOwnerFake(); } if (Fake_comPropertyPage == null) { Fake_comPropertyPage = new ComPropertyPageFake(page); } if (Fake_site == null) { Fake_site = new PropertyPageSiteFake((IPropertyPageSiteOwner)Fake_propertyPageSiteOwner, (IPropertyPage)Fake_comPropertyPage); } if (Fake_objects == null) { Fake_objects = new object[] { Fake_hierarchy.Fake_projectProperties }; } ((IPropertyPageInternal)page).SetPageSite((IPropertyPageSiteInternal)Fake_site); if (beforeSetObjects != null) { beforeSetObjects.Invoke(); } page.SetObjects(Fake_objects); }
public override void InitializePageForUnitTests(PropPageUserControlBase page) { InitializePageForUnitTests(page, null); }
public StandardTestsForPropertyPages(PropPageUserControlBase page) { _page = page; _accessor = new Microsoft_VisualStudio_Editors_PropertyPages_PropPageUserControlBaseAccessor(_page); }
abstract public void InitializePageForUnitTests(PropPageUserControlBase page);