private void HandleThirdPartyNoticesAndExit() { string pathToFile = Path.Combine(AppContext.BaseDirectory, "thirdpartynotices.html"); _outputGenerator.WriteThirdPartyNoticeOutput(pathToFile); _browserAbstraction.Open(pathToFile); Environment.Exit(ReturnValueChooser.ThirdPartyNoticesDisplayed); }
private void HandleThirdPartyNoticesAndExit() { string currentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pathToFile = Path.Combine(currentFolder, "thirdpartynotices.html"); _outputGenerator.WriteThirdPartyNoticeOutput(pathToFile); _browserAbstraction.Open(pathToFile); Environment.Exit(ReturnValueChooser.ThirdPartyNoticesDisplayed); }
public void WriteBanner_ShowThirdPartyNotices_WritesAppHeaderAndThirdPartyNotice() { const string testFile = @"c:\somePath\someFile.html"; WriteCall[] expectedCalls = { new WriteCall(AppTitleStart, WriteSource.WriteLineOneParam), new WriteCall(ThirdPartyNoticeStart, WriteSource.WriteLineOneParam), }; TextWriterVerifier textWriterVerifier = new TextWriterVerifier(_writerMock, expectedCalls); _testSubject.WriteThirdPartyNoticeOutput(testFile); textWriterVerifier.VerifyAll(); VerifyAllMocks(); }