// Delete section end ------------------------------------------------- // File section start ------------------------------------------------- /// <summary> /// Click event, Load the current "Month" created upload file. /// </summary> private void subOpenCurrentFile_Click(object sender, EventArgs e) { string currentFile = informationParser.GetUpToDateFileCSV(informationParser.CurrentTeamProjectName); if (String.IsNullOrEmpty(currentFile)) { Alert.AlertCreation("There is no Actual Monnt File!", AlertType.error); return; } else { Alert.AlertCreation("Actual Month File Loaded!", AlertType.success); FileRichTextBox.Text = informationParser.GetFileContent(currentFile); } }
public void GetFileContent_NoFileForGetContent() { // Arrange InformationParser informationParser = new InformationParser(); // Act string workingDirectory = Environment.CurrentDirectory; string projectDirectory = Directory.GetParent(workingDirectory).Parent.FullName; string fileName = "ContentForReadOther.csv"; string path = Path.Combine(projectDirectory, @"TestFiles\", fileName); string result = informationParser.GetFileContent(path); // Assert Assert.IsTrue(String.IsNullOrEmpty(result)); }