public void FixedVersions_Switch_Test(string inText, string expected, bool isFixedVersions, string mockRedirectUrl) { CommandLineOptions option = new CommandLineOptions() { BaseUrl = "https://docs.microsoft.com/en-us", FixedVersions = isFixedVersions }; var urlRepairHelper = new UrlRepairHelper(option); urlRepairHelper.MockTestData(inText, mockRedirectUrl); var newUrl = urlRepairHelper.GetDocsUrl(inText); Assert.AreEqual(expected, newUrl); }
public void RepairString_Test(string inText, string expected, string msdnUrl, string mockRedirectUrl) { CommandLineOptions option = new CommandLineOptions() { BaseUrl = "https://docs.microsoft.com/en-us", FixedVersions = true, PreVersions = true }; var urlRepairHelper = new UrlRepairHelper(option); urlRepairHelper.MockTestData(msdnUrl, mockRedirectUrl); var newText = urlRepairHelper.RepairString(inText, null); Assert.AreEqual(expected, newText); }