RemoveExtraBookTitles() 공개 메소드

Fix BL-2789, where Tok Pisin and Indonesian would show up in the source bubble for book titles, saying the equivalent of "new book" in each language. BasicBook doesn't have that anymore, but this cleans it up in books made from old shells.
public RemoveExtraBookTitles ( ) : void
리턴 void
예제 #1
0
 public void RemoveExtraBookTitles_BookTitlesThatAreJustGeneric_Removed()
 {
     var bookDom = new HtmlDom(@"<html ><head></head><body>
         <div id='bloomDataDiv'>
                 <div data-book='bookTitle' lang='en'>something unique</div>
                 <div data-book='bookTitle' lang='id'>Buku Dasar</div>
                 <div data-book='bookTitle' lang='tpi'>Nupela Buk</div>
         </div>
         <div id='somePage'>
             <div class='bloom-translationGroup bookTitle'>
                 <div class='bloom-editable' data-book='bookTitle' lang='tpi'>
                     <p>Nupela Buk<br/></p>
                 </div>
                 <div class='bloom-editable' data-book='bookTitle' lang='id'>
                     <p>Buku Dasar</p>
                 </div>
                 <div class='bloom-editable' data-book='bookTitle'>
                     <p>something unique<br/></p>
                 </div>
             </div>
         </div>
      </body></html>");
     bookDom.RemoveExtraBookTitles();
     AssertThatXmlIn.Dom(bookDom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@data-book='bookTitle' and @lang='en' and text()='something unique']", 1);
     AssertThatXmlIn.Dom(bookDom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@data-book='bookTitle' and @lang='id']", 0);
     AssertThatXmlIn.Dom(bookDom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@data-book='bookTitle' and @lang='tpi']", 0);
 }