BloomTests.Book.BookTestsBase.MakeDom C# (CSharp) Method

MakeDom() public static method

public static MakeDom ( string bodyContents, string headContents = "" ) : HtmlDom
bodyContents string
headContents string
return Bloom.Book.HtmlDom
        public static HtmlDom MakeDom(string bodyContents, string headContents="")
        {
            return new HtmlDom(@"<html ><head>" + headContents + "</head><body>" + bodyContents + "</body></html>");
        }

Usage Example

Ejemplo n.º 1
0
        public void CheckBook_NoMetaLicenseId_ReturnsNull()
        {
            var dom     = BookTestsBase.MakeDom(@"<div class='bloom-page numberedPage customPage A5Portrait'>
						<div id='testDiv' class='marginBox'>
							<div class='bloom-translationGroup bloom-trailingElement normal-style'>
								<div class='bloom-editable normal-style cke_focus bloom-content1 bloom-visibility-code-on' contenteditable='true' lang='xyz'>
										some text
								</div>
							</div>
						</div>
					</div>"                    );
            var checker = new LicenseChecker();

            LicenseChecker.SetAllowInternetAccess(false);
            LicenseChecker.SetOfflineFolder(null);
            Assert.That(checker.CheckBook(dom, new[] { "en", "fr" }), Is.Null);
            LicenseChecker.SetAllowInternetAccess(true);
            Assert.That(checker.CheckBook(dom, new[] { "en", "fr" }), Is.Null);
        }
All Usage Examples Of BloomTests.Book.BookTestsBase::MakeDom