/// <summary> /// Checks the that authors file does not contain This book title. /// </summary> /// <param name="filePath">The path to the authors file.</param> /// <param name="bookTitle">Title of book to check if contained in authors file all ready..</param> /// <returns></returns> private bool CheckThatAuthorsFileDoesNotContainThisBookTitle(string filePath, string bookTitle) { this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name; var clsInput = new InputClass(); var bookData = clsInput.ReadAllBookTitlesFromAuthorsFile(filePath); if (!bookData.Any()) { return(false); } var titleOp = new TitlesOperationClass(); var titles = titleOp.GetBookTitleFromBookData(bookData); if (!titles.Any()) { return(false); } var valid = new ValidationClass(); // true if book title is all ready contained in authors file else false. return(valid.ValidateAuthorsFileDoesNotContainThisBookTitle(titles, bookTitle)); }